ansible/playbooks/groups/virthost.yml
2015-11-05 22:38:50 +00:00

34 lines
1 KiB
YAML

# create a new virthost 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
- name: make virthost server system
hosts: virthost:bvirthost:buildvmhost:virthost-comm:colo-virt:!internetx01.fedoraproject.org:!bodhost01.fedoraproject.org
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
- { role: denyhosts, when: ansible_distribution_major_version|int != 7 }
- nagios_client
- hosts
- fas_client
- collectd/base
- { role: iscsi_client, when: datacenter == "phx2" }
- sudo
- { role: openvpn/client, when: datacenter != "phx2" }
tasks:
- include: "{{ tasks }}/yumrepos.yml"
- include: "{{ tasks }}/2fa_client.yml"
- include: "{{ tasks }}/motd.yml"
- include: "{{ tasks }}/virthost.yml"
handlers:
- include: "{{ handlers }}/restart_services.yml"