2013-11-25 17:39:28 +00:00
|
|
|
# create a new notifs-web server
|
|
|
|
# NOTE: should be used with --limit most of the time
|
|
|
|
# NOTE: make sure there is room/space for this server on the vmhost
|
2014-01-06 17:49:22 +00:00
|
|
|
# NOTE: most of these vars_path come from group_vars/notifs-web* or from hostvars
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
- name: make notifs-web server
|
|
|
|
hosts: notifs-web;notifs-web-stg
|
|
|
|
user: root
|
|
|
|
gather_facts: False
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-01-06 18:22:18 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
tasks:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ tasks }}/virt_instance_create.yml"
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
handlers:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
- name: make the box be real
|
|
|
|
hosts: notifs-web;notifs-web-stg
|
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-01-06 18:22:18 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
roles:
|
2014-01-23 17:12:40 +00:00
|
|
|
- base
|
|
|
|
- rkhunter
|
2014-11-12 18:48:17 +00:00
|
|
|
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
2014-01-23 17:12:40 +00:00
|
|
|
- nagios_client
|
2014-06-23 00:49:31 +00:00
|
|
|
- hosts
|
2014-01-23 17:12:40 +00:00
|
|
|
- fas_client
|
2014-03-21 13:45:02 +00:00
|
|
|
- collectd/base
|
2014-03-14 15:47:11 +00:00
|
|
|
- fedmsg/base
|
2014-03-14 15:53:53 +00:00
|
|
|
- notifs/frontend
|
2014-06-14 20:58:52 +00:00
|
|
|
- sudo
|
2014-08-01 18:23:40 +02:00
|
|
|
- { role: openvpn/client,
|
|
|
|
when: env != "staging" }
|
2013-11-25 17:39:28 +00:00
|
|
|
|
2014-11-12 19:08:20 +00:00
|
|
|
pre_tasks:
|
|
|
|
- include: "{{ tasks }}/apache.yml"
|
|
|
|
|
2013-11-25 17:39:28 +00:00
|
|
|
tasks:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ tasks }}/yumrepos.yml"
|
|
|
|
- include: "{{ tasks }}/2fa_client.yml"
|
|
|
|
- include: "{{ tasks }}/motd.yml"
|
|
|
|
- include: "{{ tasks }}/mod_wsgi.yml"
|
2013-11-25 17:39:28 +00:00
|
|
|
|
|
|
|
handlers:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|