mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
collectd would be nice on bvmhost-p10-01/02. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
57 lines
1.9 KiB
YAML
57 lines
1.9 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"
|
|
vars:
|
|
myhosts: "virthost:bvirthost:buildvmhost:colo_virt"
|
|
|
|
- name: make virthost server system
|
|
hosts: virthost:bvirthost:buildvmhost:colo_virt
|
|
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"
|
|
|
|
- name: override nbde_client-network-flush to work around bug
|
|
ansible.builtin.copy:
|
|
src: "{{ files }}/common/nbde_client-network-flush"
|
|
dest: /usr/bin/nbde_client-network-flush
|
|
owner: root
|
|
group: root
|
|
mode: 755
|
|
|
|
- name: tell NetworkManager we don't want any auto connections
|
|
ansible.builtin.copy:
|
|
src: "{{ files }}/common/noautodefault.conf"
|
|
dest: /etc/NetworkManager/conf.d/noautodefault.conf
|
|
owner: root
|
|
group: root
|
|
mode: 644
|
|
|
|
roles:
|
|
- base
|
|
- {role: rkhunter, when: ansible_distribution_major_version|int < 10}
|
|
- role: nagios_client
|
|
- zabbix/zabbix_agent
|
|
- hosts
|
|
- {role: openvpn/client, when: vpn|bool}
|
|
- ipa/client
|
|
- {role: collectd/base, when: ansible_distribution_major_version|int != 10}
|
|
- sudo
|
|
- virthost
|
|
- {role: linux-system-roles.nbde_client, tags: ['nbde_client'], when: (nbde|bool) }
|
|
- {role: serial-console, when: datacenter == 'rdu3' and ansible_architecture != 's390x' and ansible_architecture != 'ppc64le'}
|
|
- {role: iscsi_client, when: datacenter == 'rdu3' and inventory_hostname.startswith('bvmhost-p10') }
|
|
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|