2016-10-05 19:46:37 +00:00
|
|
|
# create a new database server system
|
|
|
|
# NOTE: should be used with --limit most of the time
|
|
|
|
# NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
|
|
|
|
|
2018-03-03 01:16:36 +00:00
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=pgbdr01.stg.phx2.fedoraproject.org:pgbdr02.stg.phx2.fedoraproject.org"
|
2016-10-05 19:46:37 +00:00
|
|
|
|
|
|
|
# Once the instance exists, configure it.
|
|
|
|
|
|
|
|
- name: configure postgresql server system
|
2018-04-13 14:57:25 +00:00
|
|
|
hosts: pgbdr01.stg.phx2.fedoraproject.org:pgbdr02.stg.phx2.fedoraproject.org
|
2016-10-05 19:46:37 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
|
|
- "/srv/private/ansible/vars.yml"
|
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- base
|
|
|
|
- rkhunter
|
|
|
|
- fas_client
|
2017-05-05 22:12:33 +00:00
|
|
|
- nagios_client
|
2016-10-05 19:46:37 +00:00
|
|
|
- hosts
|
|
|
|
- collectd/base
|
|
|
|
- collectd/postgres # This requires a 'databases' var to be set in host_vars
|
|
|
|
- sudo
|
2016-10-11 16:33:09 +00:00
|
|
|
- keepalived
|
2016-10-14 19:45:20 +00:00
|
|
|
- postgresql_server_bdr
|
2016-10-05 19:46:37 +00:00
|
|
|
|
2018-10-30 18:28:26 +00:00
|
|
|
pre_tasks:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
2018-10-30 18:28:26 +00:00
|
|
|
|
|
|
|
tasks:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
2016-10-05 19:46:37 +00:00
|
|
|
|
|
|
|
# TODO: add iscsi task
|
|
|
|
|
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|