From 3053ddd02cbc04977f0de92e1515783175fa124e Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Wed, 25 Jan 2023 10:53:02 +0100 Subject: [PATCH] nut role --- deploy.yml | 15 +++++++++++++++ hosts.yml | 32 ++++++++++++++++++++++++++++++++ roles/nut/.DS_Store | Bin 0 -> 6148 bytes roles/nut/tasks/main.yml | 26 ++++++++++++++++++++++++++ roles/nut/tasks/upsd.yml | 30 ++++++++++++++++++++++++++++++ roles/nut/tasks/upsmon.yml | 15 +++++++++++++++ roles/nut/vars/main.yml | 4 ++++ 7 files changed, 122 insertions(+) create mode 100644 roles/nut/.DS_Store create mode 100644 roles/nut/tasks/main.yml create mode 100644 roles/nut/tasks/upsd.yml create mode 100644 roles/nut/tasks/upsmon.yml create mode 100644 roles/nut/vars/main.yml diff --git a/deploy.yml b/deploy.yml index f2c882c..06ea4b7 100644 --- a/deploy.yml +++ b/deploy.yml @@ -8,6 +8,13 @@ - name: mount rw command: /usr/local/bin/rw +- name: set-up eudev + hosts: suricata + become: true + roles: + - eudev + tags: eudev + - name: basic roles hosts: - caladan @@ -157,6 +164,14 @@ roles: - wireguard +- name: set up NUT + hosts: + - suricata + become: true + roles: + - nut + tags: nut + - name: setup gopass become: true hosts: diff --git a/hosts.yml b/hosts.yml index a2835eb..efb9ed6 100644 --- a/hosts.yml +++ b/hosts.yml @@ -172,6 +172,38 @@ all: - "hdmi_group=2" - "hdmi_mode=4" + nut_device: + name: nutdev1 + config: + driver: "usbhid-ups" + port: "auto" + vendorid: "0764" + productid: "0601" + product: "OR1500ERM1U" + serial: "GBULZ2000030" + vendor: "CPS" + bus: "001" + + nut_mode: netserver + nut_admin_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 396261663339336265643530373931633034326338386337363539663634663 + 438626465393132386134383935623061666134646130353138333561326665 + 330a62346364313562303633643663303430376664356461666166373232316 + 465653633323235653833303463366330376136356234633339396532643938 + 3634300a6165363061623264306339303366313365316636383631366262336 + 564313139303133343633353034613661633639633563356466363865643533 + 3937323163 + nut_upsmon_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 313636333565356536333862386361393439666563353938343934623532366 + 433363738623862623035663138643532346330346339376437353563633365 + 320a33356464656230316565376339333331373832643631366562666331333 + 137386235666437663766313833616135303339643539353931313966623638 + 3962360a3131383461393435633363366437663535306430343631313935343 + 465343465343038383961306132653066643933646237313234326435663834 + 3865663534 + caladan: ansible_host: caladan ansible_user: ansible diff --git a/roles/nut/.DS_Store b/roles/nut/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6c130550098aed6e9b6c92355584e057e65fc248 GIT binary patch literal 6148 zcmeHKI|>3Z5S{S@f{mqRuHX%V=n1@lf?%O2_^Y?_TprCgpJrL?v{2r_^|ww;MgL}Uavl!pynvwic9^)jMBIL^4-SLfs5bli1v-vx|2l&fsyBKsEKc4$<9 z3Qz$mKn1A4rxnNwI~srbV4g<>sKC!FVBd!VH>`