Simplify site.yml and allow parallelization of 'common' role tasks, and update to new pre_task/post_task syntax for rolling update.
parent
12e49df911
commit
dd6cd68f81
@ -1,12 +0,0 @@ |
||||
--- |
||||
# This playbook deploys MySQL and configures the database on the db node(s) |
||||
|
||||
# fetch monitoring facts for iptables rules |
||||
- hosts: monitoring |
||||
tasks: |
||||
|
||||
- hosts: dbservers |
||||
user: root |
||||
roles: |
||||
- common |
||||
- db |
@ -1,12 +0,0 @@ |
||||
--- |
||||
# Playbook for HAProxy operations |
||||
|
||||
# fetch monitoring facts for iptables rules |
||||
- hosts: monitoring |
||||
tasks: |
||||
|
||||
- hosts: lbservers |
||||
user: root |
||||
roles: |
||||
- common |
||||
- haproxy |
@ -1,13 +0,0 @@ |
||||
--- |
||||
# This playbook configures the monitoring node |
||||
|
||||
# trigger fact-gathering for all hosts |
||||
- hosts: all |
||||
tasks: |
||||
|
||||
- hosts: monitoring |
||||
user: root |
||||
roles: |
||||
- common |
||||
- base-apache |
||||
- nagios |
@ -1,7 +1,36 @@ |
||||
--- |
||||
#This Playbook deploys the whole application stack in this site. |
||||
# This playbook deploys the whole application stack in this site. |
||||
|
||||
- include: db.yml |
||||
- include: web.yml |
||||
- include: haproxy.yml |
||||
- include: nagios.yml |
||||
# Apply common configuration to all hosts |
||||
- hosts: all |
||||
roles: |
||||
- common |
||||
|
||||
# Configure and deploy database servers. |
||||
- hosts: dbservers |
||||
user: root |
||||
roles: |
||||
- db |
||||
|
||||
# Configure and deploy the web servers. Note that we include two roles here, |
||||
# the 'base-apache' role which simply sets up Apache, and 'web' which includes |
||||
# our example web application. |
||||
- hosts: webservers |
||||
user: root |
||||
|
||||
roles: |
||||
- base-apache |
||||
- web |
||||
|
||||
# Configure and deploy the load balancer(s). |
||||
- hosts: lbservers |
||||
user: root |
||||
roles: |
||||
- haproxy |
||||
|
||||
# Configure and deploy the Nagios monitoring node(s). |
||||
- hosts: monitoring |
||||
user: root |
||||
roles: |
||||
- base-apache |
||||
- nagios |
||||
|
@ -1,14 +0,0 @@ |
||||
--- |
||||
# This playbook deploys the webservers with httpd and the code. |
||||
|
||||
# fetch monitoring facts for iptables rules |
||||
- hosts: monitoring |
||||
tasks: |
||||
|
||||
- hosts: webservers |
||||
user: root |
||||
|
||||
roles: |
||||
- common |
||||
- base-apache |
||||
- web |
Reference in new issue