Coder Social home page Coder Social logo

terransible's Introduction

These scripts are used for the "Deploy to AWS with Ansible and Terraform" course on Linux Academy.

terransible's People

Contributors

acantril avatar derekm1215 avatar moosakhalidla avatar tia-la avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terransible'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 !

aws_route53_zone.secondary

Issue with secondary zone

aws_route53_zone.secondary: "vpc_id": [REMOVED] use 'vpc' configuration block instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.