forked from Turgon37/ansible-apcupsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
135 lines (114 loc) · 5.28 KB
/
main.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
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
---
# defaults file for apcupsd
# Enable facts deploiement
apcupsd__facts: true
# Choose the monitoring backend to configure (if available)
# apcupsd__monitoring:
# List of packages to install
apcupsd__packages:
- apcupsd
### SERVICE CONFIGURATION
# ---------------------------------------
# The name of the system service
apcupsd__service_name: apcupsd
apcupsd__service_enabled: true
# The master configuration file
apcupsd__config_file: /etc/apcupsd/apcupsd.conf
# Apcaccess executable
apcupsd__apcaccess_executable: /usr/bin/env apcaccess
# command line options for apcaccess
apcupsd__apcaccess_options: >-
{% if apcupsd__net_server|bool %}
-h {{ apcupsd__net_server_address }}:{{ apcupsd__net_server_port }}
{% endif %}
### DEVICE CONFIGURATION
# ---------------------------------------
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM. It should be 8 characters or less.
apcupsd__upsname: ups1
# Defines the type of cable connecting the UPS to your computer.
#
# Possible generic choices for <cable> are:
# simple, smart, ether, usb
#
# Or a specific cable model number may be used:
# 940-0119A, 940-0127A, 940-0128A, 940-0020B,
# 940-0020C, 940-0023A, 940-0024B, 940-0024C,
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, 940-0625A, M-04-02-2000
apcupsd__upscable: usb
# To get apcupsd to work, in addition to defining the cable
# above, you must also define a UPSTYPE, which corresponds to
# the type of UPS you have (see the Description for more details).
# You must also specify a DEVICE, sometimes referred to as a port.
# For USB UPSes, please leave the DEVICE directive blank. For
# other UPS types, you must specify an appropriate port or address.
#
# UPSTYPE DEVICE Description
# apcsmart /dev/tty** Newer serial character device, appropriate for
# SmartUPS models using a serial cable (not USB).
#
# usb <BLANK> Most new UPSes are USB. A blank DEVICE
# setting enables autodetection, which is
# the best choice for most installations.
#
# net hostname:port Network link to a master apcupsd through apcupsd's
# Network Information Server. This is used if the
# UPS powering your computer is connected to a
# different computer for monitoring.
#
# snmp hostname:port:vendor:community
# SNMP network link to an SNMP-enabled UPS device.
# Hostname is the ip address or hostname of the UPS
# on the network. Vendor can be can be "APC" or
# "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap
# catching; you usually want "APC". Port is usually
# 161. Community is usually "private".
#
# netsnmp hostname:port:vendor:community
# OBSOLETE
# Same as SNMP above but requires use of the
# net-snmp library. Unless you have a specific need
# for this old driver, you should use 'snmp' instead.
#
# dumb /dev/tty** Old serial character device for use with
# simple-signaling UPSes.
#
# pcnet ipaddr:username:passphrase:port
# PowerChute Network Shutdown protocol which can be
# used as an alternative to SNMP with the AP9617
# family of smart slot cards. ipaddr is the IP
# address of the UPS management card. username and
# passphrase are the credentials for which the card
# has been configured. port is the port number on
# which to listen for messages from the UPS, normally
# 3052. If this parameter is empty or missing, the
# default of 3052 will be used.
#
# modbus /dev/tty** Serial device for use with newest SmartUPS models
# supporting the MODBUS protocol.
apcupsd__upstype: usb
apcupsd__device:
# LOCKFILE <path to lockfile>
# Path for device lock file. Not used on Win32.
apcupsd__lockdir: /var/lock
# Interval (in seconds) at which apcupsd polls the UPS for status. This
# setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb,
# dumb) and networked UPSes (UPSTYPE net, snmp).
apcupsd__polltime: 60
# Normally standalone unless you share an UPS using an APC ShareUPS card
apcupsd__upsclass: standalone
# Normally disable unless you share an UPS using an APC ShareUPS card.
apcupsd__upsmode: disable
### NETWORK CONFIGURATION
# ---------------------------------------
# Enables/Disables the network information server.
# If netstatus is on, a network information
# server process will be started for serving the STATUS and
# EVENT data over the network (used by CGI programs).
apcupsd__net_server: true
# IP address on which NIS server will listen for incoming connections.
apcupsd__net_server_address: 127.0.0.1
# port to use for sending STATUS and EVENTS data over the network.
apcupsd__net_server_port: 3551