2013-09-19 03:33:39 +00:00
|
|
|
# create a new nuancier 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/nuancier* or from hostvars
|
2013-09-19 03:33:39 +00:00
|
|
|
|
2017-10-15 19:54:19 +00:00
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=nuancier:nuancier-stg"
|
2013-09-19 03:33:39 +00:00
|
|
|
|
|
|
|
- name: make the box be real
|
2016-02-02 21:03:19 +00:00
|
|
|
hosts: nuancier:nuancier-stg
|
2013-09-19 03:33:39 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
2014-02-26 09:10:22 +01:00
|
|
|
vars_files:
|
2013-09-19 03:33:39 +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-09-19 03:33:39 +00:00
|
|
|
|
|
|
|
roles:
|
2014-01-23 17:12:40 +00:00
|
|
|
- base
|
|
|
|
- rkhunter
|
2017-05-05 22:12:33 +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-06-14 20:58:52 +00:00
|
|
|
- sudo
|
2014-08-01 18:23:40 +02:00
|
|
|
- { role: openvpn/client,
|
|
|
|
when: env != "staging" }
|
2016-08-08 13:51:44 +02:00
|
|
|
- mod_wsgi
|
2013-09-19 03:33:39 +00:00
|
|
|
|
|
|
|
tasks:
|
2017-10-17 17:37:03 +00:00
|
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
2013-09-26 15:44:01 +00:00
|
|
|
|
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
2013-09-26 15:44:01 +00:00
|
|
|
|
|
|
|
- name: set up fedmsg
|
2016-02-02 21:03:19 +00:00
|
|
|
hosts: nuancier:nuancier-stg
|
2013-09-26 15:44:01 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
2014-02-26 09:10:22 +01:00
|
|
|
vars_files:
|
2013-09-26 15:44:01 +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-09-26 15:44:01 +00:00
|
|
|
|
2013-10-15 03:40:57 +00:00
|
|
|
roles:
|
2014-03-14 15:47:11 +00:00
|
|
|
- fedmsg/base
|
2013-09-19 03:33:39 +00:00
|
|
|
|
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
2013-09-20 15:04:57 +00:00
|
|
|
|
2014-02-26 09:16:22 +01:00
|
|
|
- name: set up gluster on stg
|
|
|
|
hosts: nuancier-stg
|
2014-02-07 21:36:24 +00:00
|
|
|
user: root
|
|
|
|
gather_facts: True
|
|
|
|
|
2014-02-26 09:10:22 +01:00
|
|
|
vars_files:
|
2014-02-07 21:36:24 +00:00
|
|
|
- /srv/web/infra/ansible/vars/global.yml
|
2015-01-09 22:59:18 +00:00
|
|
|
- "/srv/private/ansible/vars.yml"
|
2014-02-07 21:36:24 +00:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
2014-02-07 21:41:47 +00:00
|
|
|
roles:
|
|
|
|
- role: gluster/server
|
2014-02-07 21:48:53 +00:00
|
|
|
name: gluster
|
2014-02-07 21:42:33 +00:00
|
|
|
username: "{{ nuancier_gluster_username }}"
|
|
|
|
password: "{{ nuancier_gluster_password }}"
|
2014-02-07 21:41:47 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
2014-02-26 09:10:22 +01:00
|
|
|
datadir: /srv/glusterfs/nuancier-stg
|
2014-02-07 21:41:47 +00:00
|
|
|
|
|
|
|
- role: gluster/client
|
2014-02-07 21:48:53 +00:00
|
|
|
name: gluster
|
2014-02-26 09:10:22 +01:00
|
|
|
servers:
|
2014-02-07 21:41:47 +00:00
|
|
|
- nuancier01.stg.phx2.fedoraproject.org
|
|
|
|
- nuancier02.stg.phx2.fedoraproject.org
|
2014-02-26 09:10:22 +01:00
|
|
|
username: "{{ nuancier_gluster_username }}"
|
|
|
|
password: "{{ nuancier_gluster_password }}"
|
|
|
|
owner: apache
|
|
|
|
group: root
|
|
|
|
mountdir: /var/cache/nuancier
|
|
|
|
|
2014-02-26 09:16:22 +01:00
|
|
|
- name: set up gluster on prod
|
|
|
|
hosts: nuancier
|
|
|
|
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-02-26 09:16:22 +01:00
|
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
|
2014-02-26 09:10:22 +01:00
|
|
|
roles:
|
|
|
|
- role: gluster/server
|
|
|
|
name: gluster
|
|
|
|
username: "{{ nuancier_gluster_username }}"
|
|
|
|
password: "{{ nuancier_gluster_password }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
datadir: /srv/glusterfs/nuancier
|
|
|
|
|
|
|
|
- role: gluster/client
|
|
|
|
name: gluster
|
|
|
|
servers:
|
2014-02-26 08:46:32 +01:00
|
|
|
- nuancier01.phx2.fedoraproject.org
|
|
|
|
- nuancier02.phx2.fedoraproject.org
|
2014-02-07 21:42:33 +00:00
|
|
|
username: "{{ nuancier_gluster_username }}"
|
|
|
|
password: "{{ nuancier_gluster_password }}"
|
2014-02-07 21:41:47 +00:00
|
|
|
owner: apache
|
|
|
|
group: root
|
|
|
|
mountdir: /var/cache/nuancier
|
2014-02-07 21:36:24 +00:00
|
|
|
|
2013-09-20 15:04:57 +00:00
|
|
|
- name: deploy nuancier itself
|
2016-02-02 21:03:19 +00:00
|
|
|
hosts: nuancier:nuancier-stg
|
2013-09-20 15:04:57 +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 17:49:22 +00:00
|
|
|
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
2013-09-20 15:04:57 +00:00
|
|
|
|
|
|
|
roles:
|
2014-01-23 17:12:40 +00:00
|
|
|
- nuancier
|
2013-09-20 18:09:04 +00:00
|
|
|
|
|
|
|
handlers:
|
2017-10-15 20:33:11 +00:00
|
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|