52 lines
1020 B
Plaintext
52 lines
1020 B
Plaintext
package nut
|
|
|
|
templates: [
|
|
{
|
|
template: "nut/nut.sysusers"
|
|
dest: "/etc/sysusers.d/nut.conf"
|
|
hooks: {
|
|
changed: [{
|
|
run: "systemd-sysusers /etc/sysusers.d/nut.conf"
|
|
immediate: true
|
|
}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/ups.conf"
|
|
dest: "/etc/ups/ups.conf"
|
|
hooks: {
|
|
changed: [{run: "systemctl try-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/upsd.conf"
|
|
dest: "/etc/ups/upsd.conf"
|
|
owner: "root"
|
|
group: "nut"
|
|
mode: "u=rw,g=r,o="
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/upsd.users"
|
|
dest: "/etc/ups/upsd.users"
|
|
owner: "root"
|
|
group: "nut"
|
|
mode: "u=rw,g=r,o="
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/nut-server.container"
|
|
dest: "/etc/containers/systemd/nut-server.container"
|
|
hooks: {
|
|
changed: [
|
|
{run: "systemctl daemon-reload", immediate: true},
|
|
{run: "systemctl restart nut-server"},
|
|
]
|
|
}
|
|
},
|
|
]
|