ansible/playbooks/groups/mdapi.yml

67 lines
1.5 KiB
YAML
Raw Normal View History

2017-10-15 19:54:19 +00:00
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=mdapi:mdapi-stg"
2015-11-09 15:43:30 +01:00
- name: make the box be real
hosts: mdapi-stg:mdapi
2015-11-09 15:43:30 +01:00
user: root
gather_facts: True
2016-08-08 19:36:31 +00:00
vars_files:
2015-11-09 15:43:30 +01:00
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
2015-11-09 15:43:30 +01:00
roles:
- base
- rkhunter
- nagios_client
2015-11-09 15:43:30 +01:00
- hosts
- fas_client
- rsyncd
- sudo
- { role: openvpn/client,
when: env != "staging" }
- collectd/base
tasks:
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
- import_tasks: "{{ tasks_path }}/motd.yml"
2015-11-09 15:43:30 +01:00
handlers:
2017-10-15 20:33:11 +00:00
- import_tasks: "{{ handlers_path }}/restart_services.yml"
2015-11-09 15:43:30 +01:00
- name: deploy mdapi itself
hosts: mdapi-stg:mdapi
2015-11-09 15:43:30 +01:00
user: root
gather_facts: True
vars_files:
2015-11-09 15:43:30 +01:00
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
roles:
- mdapi
2016-07-27 12:12:40 +02:00
- { role: plus-plus-service, when: env == "staging" }
2015-11-09 15:43:30 +01:00
handlers:
2017-10-15 20:33:11 +00:00
- import_tasks: "{{ handlers_path }}/restart_services.yml"
2015-11-09 15:43:30 +01:00
- name: set up fedmsg
hosts: mdapi-stg:mdapi
2015-11-09 15:43:30 +01:00
user: root
gather_facts: True
2016-08-08 19:36:31 +00:00
vars_files:
2015-11-09 15:43:30 +01:00
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
roles:
- fedmsg/base
2015-11-09 15:43:30 +01:00
handlers:
2017-10-15 20:33:11 +00:00
- import_tasks: "{{ handlers_path }}/restart_services.yml"