These scripts are used for the "Deploy to AWS with Ansible and Terraform" course on Linux Academy.
terransible's Introduction
terransible's People
Forkers
mittal-anshul rpravipati rathath-it sjonnalagad1 dcmikki karthikghantasala raghu2389 ravikff baileyvw praveenkavedi dilipsun karthik12112 parikverma hmunduri macie-kassh warrenpnz thakurmhn ayoneeyee vietwear bharathgouni saifulcce davron19 sumitrock20 ramkrishna84 cchrist67 kkum30 rahulggujar ajjubond etafoh vinaygwd impatientlearning sushantkhandelwal78 sadfaerie keshavkummari trancerelaxer to2folet godwinotse nirajgtm kabads olgabalter psoni03 ortkin ldjoudi javi31170 ericwaynewhite gargworld emhaye walidmoussa akshayjenkins basivireddy toneb30 madhunarne lclayton1977 vijesh12 sulaimanismail juanpi9 ola07 qhawk stephanusn phaneendraus94 scott45 devlware maheshdivan jagdishmane pandian3k amrendra08 nabarunsen anneteja viper233 brunocrt olublessed arunvilla justrehan86 devopsguy25 pawardipak120 rahman13dec4u andrew070583 syck40 divyeshramani kishanadd sulimusa ashanti88 ajanarth somu4git gaganbioinfo jakrob abakhouz malikasifnawaz janani2019 afaleti charan417 gnvsp ssprasad100 gauravchatrath varunthejdev israelistic rd1981 bulletsingh nikolinho ramansawhney04terransible's Issues
unable to install apache using Ansible-playbook
I am a beginner in terraform and ansible. I am following the linuxacademy course to deploy a wordpress website using terraform and ansible in an aws enviroment.
Course reference : https://github.com/linuxacademy/terransible/tree/master/course_scripts
My setup:
OS version : Ubuntu Server 16.04
ansible version : 2.4.2.0
python version 2.7.12
After went through alot of troubleshooting, I am able to run terraform apply successfully.
When i run ansible-playbook -i aws_hosts wordpress.yml, i encounter this error
TASK [Install Apache.] *******************************************************************************************************
failed: [111.22.22.22] (item=[u'httpd', u'php', u'php-mysql']) => {"changed": false, "item": ["httpd", "php", "php-mysql"], "msg": "No package matching 'httpd' found available, installed or updated", "rc": 126, "results": ["No package matching 'httpd' found available, installed or updated"]}
Here is my wordpress.yml config file
---
- hosts: dev
become: yes
remote_user: ubuntu
gather_facts: false
tasks:
- name: Check for Python
raw: test -e /usr/bin/python2
changed_when: false
failed_when: false
register: check_python
- name: Install Python
raw: apt -y update && apt install -y python-minimal
when: check_python.rc != 0
- set_fact:
ansible_python_default_interpreter: "{{ ansible_python_interpreter }}"
ansible_python_interpreter: "/usr/bin/python"
- name: Install Apache.
yum: name={{ item }} state=present
with_items:
- httpd
- php
- php-mysql
- name: Download WordPress
get_url: url=http://wordpress.org/wordpress-5.0.2.tar.gz dest=/var/www/html/wordpress.tar.gz force=yes
- name: Extract WordPress
command: "tar xzf /var/www/html/wordpress.tar.gz -C /var/www/html --strip-components 1"
- name: Make my directory tree readable
file:
path: /var/www/html/
mode: u=rwX,g=rX,o=rX
recurse: yes
owner: apache
group: apache
- name: Make sure Apache is started now and at boot.
service: name=httpd state=started enabled=yes
Here is my main.tf attached
main.tf.txt
Check python and yum is installed and tested running ok but not sure why the error message ? Please help if any kind soul able to knows what is the issue here.
Appreciate it and thanks !
tags in terraform 12
change tags { to tags = {
aws_route53_zone.secondary
Issue with secondary zone
aws_route53_zone.secondary: "vpc_id": [REMOVED] use 'vpc' configuration block instead
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.