1
0
IaC/ansible/playbooks/nut.yaml
michael 7eddbba696 Add k8s shutdown/openup scripts
Add nut ansible roles
Add acme certificate ansible role
2024-01-11 01:11:16 +13:00

34 lines
707 B
YAML

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