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
|
|
|
|
2019-10-17 19:26:33 +00:00
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=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:db-qa02.qa.fedoraproject.org:db-koji01.stg.phx2.fedoraproject.org:db_qa03.qa.fedoraproject.org:db-koji02.phx2.fedoraproject.org"
|
2013-06-24 21:27:04 +00:00
|
|
|
|
2016-08-08 19:36:31 +00:00
|
|
|
# Once the instance exists, configure it.
|
2013-06-24 21:27:04 +00:00
|
|
|
|
2014-01-10 18:56:25 +00:00
|
|
|
- name: configure postgresql server system
|
2019-10-17 19:04:33 +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:db-qa02.qa.fedoraproject.org:db-koji01.stg.phx2.fedoraproject.org:db-qa03.qa.fedoraproject.org:db-koji02.phx2.fedoraproject.org
|
2013-06-24 21:27:04 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
2016-08-08 19:36:31 +00:00
|
|
|
vars_files:
|
2013-06-24 21:27:04 +00:00
|
|
|
- /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
|
|
|
|
2017-10-05 02:08:48 +00:00
|
|
|
pre_tasks:
|
2019-11-18 18:58:47 +00:00
|
|
|
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
2017-10-05 02:08:48 +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
|
|
|
- fas_client
|
2017-05-05 22:12:33 +00:00
|
|
|
- nagios_client
|
2014-06-23 00:49:31 +00:00
|
|
|
- hosts
|
2016-10-05 19:46:37 +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:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
2013-06-24 21:27:04 +00:00
|
|
|
|
|
|
|
# TODO: add iscsi task
|
|
|
|
|
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|