2013-06-24 21:27:04 +00:00
|
|
|
# create a new database server system
|
|
|
|
# NOTE: should be used with --limit most of the time
|
2014-01-06 17:49:22 +00:00
|
|
|
# NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
|
2013-06-24 21:27:04 +00:00
|
|
|
|
2014-01-10 18:56:25 +00:00
|
|
|
- name: make postgresql-server instance
|
2015-01-12 18:53:52 +00:00
|
|
|
hosts: db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org
|
2013-06-24 21:27:04 +00:00
|
|
|
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-06-24 21:27:04 +00:00
|
|
|
|
|
|
|
tasks:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ tasks }}/virt_instance_create.yml"
|
2013-06-24 21:27:04 +00:00
|
|
|
|
|
|
|
handlers:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|
2013-06-24 21:27:04 +00:00
|
|
|
|
|
|
|
# Once the instance exists, configure it.
|
|
|
|
|
2014-01-10 18:56:25 +00:00
|
|
|
- name: configure postgresql server system
|
2015-01-12 18:53:52 +00:00
|
|
|
hosts: db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org
|
2013-06-24 21:27:04 +00:00
|
|
|
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-06-24 21:27:04 +00:00
|
|
|
|
2013-08-19 20:12:26 +00:00
|
|
|
roles:
|
2014-01-23 17:12:40 +00:00
|
|
|
- base
|
|
|
|
- rkhunter
|
2014-09-25 20:10:49 +00:00
|
|
|
- { role: denyhosts, when: ansible_distribution_major_version != '7' }
|
|
|
|
- fas_client
|
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
|
|
|
- postgresql_server
|
2014-05-29 16:36:43 +00:00
|
|
|
- collectd/base
|
|
|
|
- collectd/postgres # This requires a 'databases' var to be set in host_vars
|
2014-06-14 20:58:52 +00:00
|
|
|
- sudo
|
2014-12-19 13:45:18 +00:00
|
|
|
- { role: openvpn/client, when: inventory_hostname == "db-fas01.phx2.fedoraproject.org" or inventory_hostname == "db01.phx2.fedoraproject.org" }
|
2013-08-19 20:12:26 +00:00
|
|
|
|
2013-06-24 21:27:04 +00:00
|
|
|
tasks:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ tasks }}/yumrepos.yml"
|
|
|
|
- include: "{{ tasks }}/2fa_client.yml"
|
|
|
|
- include: "{{ tasks }}/motd.yml"
|
2013-06-24 21:27:04 +00:00
|
|
|
|
|
|
|
# TODO: add iscsi task
|
|
|
|
|
|
|
|
handlers:
|
2014-01-01 19:15:11 +00:00
|
|
|
- include: "{{ handlers }}/restart_services.yml"
|