-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpeanut.yml
57 lines (50 loc) · 1.33 KB
/
peanut.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- hosts: homelab
vars:
application: peanut
docker_network: "{{ networks.user }}"
handlers:
- name: Restart
community.docker.docker_container:
name: "{{ application }}"
restart: true
comparisons:
'*': ignore
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_root_group }}"
mode: "0771"
- name: Create config file
ansible.builtin.copy:
dest: "{{ config_directory }}/settings.yml"
owner: "{{ common_root_id }}"
group: "{{ common_root_group }}"
mode: "0644"
content: |
NUT_SERVERS:
- HOST: "{{ nut_host }}"
PORT: 3493
WEB_HOST: 0.0.0.0
WEB_PORT: 8080
notify: Restart
- name: Create container
ansible.builtin.include_role:
name: docker_container
vars:
image: brandawg93/peanut:4.4.2
volumes:
- "{{ config_directory }}:/config"
traefik:
- port: 8080
auth: page
homepage:
name: PeaNUT
group: Management
weight: 300
description: "Dashboard for Network UPS Tools"
widget:
key: cyberpower