simoncaron.nut

Ansible Role: NUT

Build Status Ansible Galaxy Downloads

This Ansible role installs and configures NUT (Network UPS Tools) on Debian-based systems.

Role Variables

Here are the available variables along with their default values (see defaults/main.yml):

  • nut_managed_config: true

    • If set to false, changes in /etc/nut/ are up to you. This can be useful for complex setups.
  • nut_host: localhost

  • nut_user: monitor

  • nut_password: Whatever...

    • These are for configuring the monitor user. Remember, in NUT, a user is different from a typical UNIX user.
  • nut_ups: (For configuring the UPS)

      • name: Identifier for the UPS (choose a unique name).
      • driver: The driver for your hardware. Check the available NUT drivers and ensure the installed version supports it.
      • device: The location where the UPS connects (usually an USB or serial port).
      • description: An optional string for notes or debugging.
      • extra: Additional configuration options to include in the relevant config file.

Other optional variables:

  • nut_mode: standalone (Check man 5 nut.conf for details)
  • nut_powervalue: 1 (See man 5 upsmon.conf for the MONITOR directive)
  • nut_role: master (Also from man 5 upsmon.conf)
  • nut_services: (Services to enable)
      • nut-driver
      • nut-monitor
      • nut-server

Example Playbook

Here's a simple playbook example:

- hosts: all
  roles:
  - role: ntd.nut
    nut_ups:
      - name: riello
        driver: riello_usb
        device: /dev/ups
        description: iPlug 800

For more examples, check tests/test.yml.

License

MIT

Author Information

This role was created in 2016 by Nicola Fontana (ntd@entidi.it).

Informazioni sul progetto

Network UPS Tools (nut) for Debian.

Installa
ansible-galaxy install simoncaron.nut
Licenza
mit
Download
10.7k
Proprietario
Software Engineer | IaC | Containers | Ansible | Kubernetes | Helm