forked from saltstack-formulas/nut-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpillar.example
160 lines (153 loc) · 4.58 KB
/
pillar.example
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
nut:
# All the parameters (key) names in the `config` sections correspond to an
# equivalent parameter in the conf files, lowercased.
# Commented parameters are left undefined so they respect the values provided
# by the distros packages.
config_dir: /etc/nut
config: nut.conf
rootgroup: nut
### MAIN NUT MODE FILE
mode: standalone
server:
pkgs:
- nut-server
# The nut-server package includes various parts, so each config file has a
# section here
### THE UPS DRIVERS
ups:
service:
name: nut-driver
enabled: true
config:
file: ups.conf
maxretry: 3
retrydelay: 1
units:
# Each UPS can have a different configuration section and multiple
# UPS can be managed by a single NUT server
ups1:
driver: dummy-ups
port: /dev/null
desc: Dummy server
apc:
driver: apcsmart
port: /dev/usb0
desc: An APC APC
powerware:
driver: bcmxcp_usb
port: auto
desc: A PowerWare UPS
### NUT's UPS DAEMON
upsd:
service:
name: nut-server
enabled: true
config:
file: upsd.conf
# maxage: 15
# statepath: /run/nut
### LISTEN can be set as a string, like
# listen: address
# or as a list, like:
# listen:
# - 'address_1:port'
# - 'address_2:port'
# - 'address3'
# max_connections: 1024
# cert_file:
# cert_path:
# cert_ident:
# cert_request:
### USERS WITH ACCESS TO UPSD
users:
config:
file: upsd.users
users:
ups:
password: ups
actions: SET FSD
instcmds: ALL
upsmon: master
### NUT HAS A COLLECTION OF CLIENT APPLICATIONS WHICH USUALLY COME IN
### SINGLE PACKAGE
client:
pkgs:
- nut-client
### THIS IS THE CONFIGURATION SECTION FOR UPSMON, THE DEFAULT CLIENT APP
### THAT MONITORS AND MANAGES THE SERVERS CONNECTED TO THE UPS
upsmon:
service:
name: nut-monitor
enabled: true
config:
file: upsmon.conf
# run_as_user: nut
# minsupplies: 1
# shutdowncmd: /sbin/shutdown -h +0
# notifycmd: /some/notify/script
# pollfreq: 5
# pollfreqalert: 5
# hostsync: 15
# deadtime: 15
# powerdownflag: killpower
### NOTIFYMSG can be set as a string, like
# notifymsg: 'ONBATT "UPS %s on battery"'
# or as a map, like:
# notifymsg:
# online: some online message
# onbatt: an on battery message
# lowbatt: ...
# fsd: ...
# commok: ...
# commbad: ...
# shutdown: ...
# replbatt: ...
# nocomm: ...
# noparent: ...
### NOTIFYFLAG has the same treatment as NOTIFYMSG
# notifyflag:
# rbwarntime: 43200
# nocommwarntime: 300
# finaldelay: 5
### CERTPATH DEPENDS ON COMPILATION, SEE NUT DOCS
# certpath:
### CERTIDENT DEPENDS ON COMPILATION, SEE NUT DOCS
# certident:
# name: certificate_name
# password: certificate_password
### CERTHOST DEPENDS ON COMPILATION, SEE NUT DOCS
# certhost:
# hostname: localhost
# name: My nut server
# certverify: 1
# forcessl: 1
### CERTVERIFY DEPENDS ON COMPILATION, SEE NUT DOCS
# certverify: 1
# forcessl: 1
monitor:
# Each UPS that is monitored by this host should have an entry
# following the format
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
# A list with entries (one UPS per line) or a dict are supported
# - powerware@some.host 1 john jpass master
# - some@other.ups 1 user pass slave
ups:
system: ups@localhost
username: upsmon
password: ups
upssched:
config:
file: upssched.conf
# cmdscript: /bin/upssched-cmd
### PIPEFN is usually undefined for security reasons. SEE NUT DOCS
# pipefn:
# lockfn:
### As AT supports a few differnt combination of parameters, I just
### left it as a list of commands to expand, like
# at:
# - COMMOK myups@localhost CANCEL-TIMER upsgone
# - COMMBAD * START-TIMER upsgone 10
# - ONLINE * EXECUTE ups-back-on-line