This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hypervisors/ansible/hypervisors.yml

59 lines
1.2 KiB
YAML
Raw Normal View History

2023-04-24 17:28:53 +00:00
---
2023-05-03 21:35:57 +00:00
- hosts: hypervisors
2023-04-24 17:28:53 +00:00
handlers:
- name: enable interfaces
command:
cmd: ifup -a
pre_tasks:
2023-04-28 08:56:08 +00:00
- name: Set timezone
timezone:
name: Europe/Amsterdam
2023-04-25 20:02:00 +00:00
- name: Create data directory
file:
path: /data
state: directory
2023-04-26 14:07:06 +00:00
mode: og=rwx
2023-04-25 20:02:00 +00:00
2023-04-24 17:28:53 +00:00
roles:
2023-04-26 15:45:19 +00:00
- {role: setup_apt, tags: setup_apt}
- {role: libvirt, tags: libvirt}
2023-05-03 21:35:57 +00:00
- hosts: atlas
roles:
2023-04-24 17:28:53 +00:00
- {role: postgresql, tags: postgresql}
2023-04-25 20:02:00 +00:00
- {role: ssh_ca, tags: ssh_ca}
2023-05-04 11:43:33 +00:00
- {role: wireguard, tags: wireguard}
2023-05-03 21:35:57 +00:00
- hosts: hypervisors
pre_tasks:
- name: Copy interfaces configuration
copy:
src: dmz.conf
dest: /etc/network/interfaces.d/dmz.conf
2023-05-04 11:43:33 +00:00
register: interfaces
- name: Enable interfaces
command:
cmd: ifup -a
when: interfaces.changed
2023-05-03 21:35:57 +00:00
2023-05-10 16:54:43 +00:00
- name: Delete externally managed environment file
shell:
cmd: "rm /usr/lib/python*/EXTERNALLY-MANAGED"
register: rm
changed_when: "rm.rc == 0"
failed_when: "false"
2023-05-03 21:35:57 +00:00
roles:
2023-04-26 17:29:58 +00:00
- {role: ssh_ca_known_hosts, tags: ssh_ca_known_hosts}
- {role: deploy_ssh_certificates, tags: deploy_ssh_certificates}
- hosts: atlas, jefke
roles:
2023-04-26 15:45:19 +00:00
- {role: borg, tags: borg}