38 lines
1.3 KiB
YAML
38 lines
1.3 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
|
|
|
|
- import_playbook: "/srv/web/infra/ansible/playbooks/include/happy_birthday.yml myhosts=virthost:bvirthost:buildvmhost:virthost_comm:colo_virt:virthost_communishift:!buildvmhost-s390x-01.s390.fedoraproject.org"
|
|
|
|
- name: make virthost server system
|
|
hosts: virthost:bvirthost:buildvmhost:virthost_comm:colo_virt:virthost_communishift
|
|
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
|
|
|
|
pre_tasks:
|
|
- include_vars: dir=/srv/web/infra/ansible/vars/all/ ignore_files=README
|
|
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
|
|
|
roles:
|
|
- base
|
|
- rkhunter
|
|
- nagios_client
|
|
- hosts
|
|
- fas_client
|
|
- collectd/base
|
|
- { role: iscsi_client, when: "inventory_hostname.startswith(('bvirthost', 'buildvmhost-0'))" }
|
|
- sudo
|
|
- { role: openvpn/client, when: vpn|bool }
|
|
- virthost
|
|
|
|
tasks:
|
|
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
|
- import_tasks: "{{ tasks_path }}/motd.yml"
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|