Removed garbage.

pull/63/head
David Federlein 11 years ago
parent dc04cb51c3
commit f6de069ccf
  1. 23
      apache/README.md
  2. 3
      apache/group_vars/all
  3. 3
      apache/group_vars/webservers
  4. 2
      apache/hosts
  5. 0
      apache/roles/apache/handlers/main.yml
  6. 9
      apache/roles/apache/tasks/deploy_site.yml
  7. 13
      apache/roles/apache/tasks/install_apache.yml
  8. 3
      apache/roles/apache/tasks/main.yml
  9. 10
      apache/roles/apache/templates/index.html.j2
  10. 3
      apache/roles/common/handlers/main.yml
  11. 2
      apache/roles/common/tasks/main.yml
  12. 16
      apache/site.yml

@ -1,23 +0,0 @@
Building a simple Apache Server and deploying index.html using Ansible Playbooks.
-------------------------------------------
These playbooks require Ansible 1.2.
These playbooks are meant to be a reference and starter's guide to building
Ansible Playbooks. These playbooks were tested on CentOS 6.x so we recommend
that you use CentOS or RHEL to test these modules.
The Apache server can be on a single node or multiple nodes. The inventory file
'hosts' defines the nodes in which the stacks should be configured.
[webservers]
localhost
Here the webserver would be configured on the local host. This can be deployed
using the following command:
ansible-playbook -i hosts site.yml
Once done, you can check the results by browsing to http://localhost/index.php.
You should see a simple test page and a list of databases retrieved from the
database server.

@ -1,3 +0,0 @@
---
# Variables listed here are applicable to all host groups

@ -1,3 +0,0 @@
---
# The variables file used by the playbooks in the webservers group.
# These don't have to be explicitly imported by vars_files: they are autopopulated.

@ -1,2 +0,0 @@
[webservers]
web1

@ -1,9 +0,0 @@
---
# These tasks are responsible for copying the latest dev/production code from
# the version control system.
- name: Copy the code from repository
git: repo={{ repository }} dest=/var/www/html/
- name: Creates the index.html file
template: src=index.html.j2 dest=/var/www/html/index.html

@ -1,13 +0,0 @@
---
# These tasks install apache.
- name: install packages
yum: name=httpd state=present
when: ansible_os_family == "RedHat"
- name: install packages
apt: name=apache2 state=present
when: ansible_os_family == "Debian"
- name: http service state
service: name=httpd state=started enabled=yes

@ -1,3 +0,0 @@
---
- include: install_apache.yml
- include: copy_code.yml

@ -1,10 +0,0 @@
<html>
<head>
<title>Ansible Application</title>
</head>
<body>
</br>
<a href=http://{{ ansible_eth0.ipv4.address }}/index.html>Homepage</a>
</br>
</body>
</html>

@ -1,3 +0,0 @@
---
# Handler to handle common notifications. Handlers are called by other plays.
# See http://ansible.cc/docs/playbooks.html for more information about handlers.

@ -1,2 +0,0 @@
---
# This playbook contains common plays that will be run on all nodes.

@ -1,16 +0,0 @@
---
# This playbook deploys, update and config apache.
- name: common config
hosts: all
user: root
roles:
- common
- name: apache
hosts: webservers
user: root
roles:
- apache