2024-01-09 08:05:03 -05:00
|
|
|
- name: Install NUT
|
|
|
|
hosts:
|
|
|
|
- nut_servers
|
|
|
|
- nut_clients
|
|
|
|
become: true
|
2024-01-10 07:11:16 -05:00
|
|
|
gather_facts: true
|
2024-01-09 08:05:03 -05:00
|
|
|
tasks:
|
|
|
|
|
2024-01-10 07:11:16 -05:00
|
|
|
- name: Install NUT package on Archlinux
|
2024-01-09 08:05:03 -05:00
|
|
|
when: ansible_facts['os_family'] == "Archlinux"
|
|
|
|
community.general.pacman:
|
2024-01-10 07:11:16 -05:00
|
|
|
name: nut
|
2024-01-09 08:05:03 -05:00
|
|
|
state: latest
|
|
|
|
update_cache: true
|
|
|
|
upgrade: false
|
|
|
|
|
|
|
|
- name: Setup NUT servers
|
2024-01-10 07:11:16 -05:00
|
|
|
gather_facts: false
|
2024-01-09 08:05:03 -05:00
|
|
|
hosts: nut_servers
|
|
|
|
become: true
|
|
|
|
roles:
|
2024-01-10 07:11:16 -05:00
|
|
|
- role: acme_certificate
|
|
|
|
vars:
|
|
|
|
acme_certificate_subject: "{{ ansible_hostname }}"
|
|
|
|
acme_certificate_zone: balsillie.house
|
|
|
|
- role: nut_server
|
2024-01-09 08:05:03 -05:00
|
|
|
|
|
|
|
- name: Setup NUT clients
|
2024-01-10 07:11:16 -05:00
|
|
|
gather_facts: false
|
2024-01-09 08:05:03 -05:00
|
|
|
hosts: nut_clients
|
|
|
|
become: true
|
|
|
|
roles:
|
|
|
|
- nut_client
|