1
0
IaC/ansible/playbooks/nut.yaml

30 lines
559 B
YAML
Raw Normal View History

2024-01-09 08:05:03 -05:00
- name: Install NUT
hosts:
- nut_servers
- nut_clients
become: true
tasks:
- name: Install NUT packages
when: ansible_facts['os_family'] == "Archlinux"
community.general.pacman:
name: "{{ nut_packages }}"
state: latest
update_cache: true
upgrade: false
- name: Setup NUT servers
gather_facts: true
hosts: nut_servers
become: true
roles:
- ssl_certificate
- nut_server
- name: Setup NUT clients
gather_facts: true
hosts: nut_clients
become: true
roles:
- nut_client