mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-10 20:00:18 +01:00
61 lines
1,002 B
YAML
61 lines
1,002 B
YAML
- hosts: localhost
|
|
connection: local
|
|
pre_tasks:
|
|
- fail: msg=" Please make sure the variables id is specified and unique in the command line -e id=uniquedev1"
|
|
when: id is not defined
|
|
|
|
roles:
|
|
- role: ec2
|
|
type: dns
|
|
ncount: 1
|
|
|
|
- role: ec2
|
|
type: mq
|
|
ncount: 3
|
|
|
|
- role: ec2
|
|
type: broker
|
|
ncount: 2
|
|
|
|
- role: ec2
|
|
type: nodes
|
|
ncount: "{{ count }}"
|
|
|
|
post_tasks:
|
|
- name: Wait for the instance to come up
|
|
wait_for: delay=10 host={{ item.public_dns_name }} port=22 state=started timeout=360
|
|
with_items: ec2.instances
|
|
|
|
- debug: msg="{{ groups }}"
|
|
|
|
- hosts: all:!localhost
|
|
user: root
|
|
roles:
|
|
- role: common
|
|
|
|
- hosts: dns
|
|
user: root
|
|
roles:
|
|
- role: dns
|
|
|
|
- hosts: mongo_servers
|
|
user: root
|
|
roles:
|
|
- role: mongodb
|
|
|
|
- hosts: mq
|
|
user: root
|
|
roles:
|
|
- role: mq
|
|
|
|
- hosts: broker
|
|
user: root
|
|
roles:
|
|
- role: broker
|
|
|
|
- hosts: nodes
|
|
user: root
|
|
roles:
|
|
- role: nodes
|
|
|
|
|