nut: Pass explicit path to systemd-sysusers
When `tmpl` substitutes the path of the generated file for `%s` in hook commands, it uses the full path including the `destdir` prefix. Since we're running `tmpl` inside a container, but `systemd-sysusers` outside it (via `nsenter -t 1`), that path is not correct. Thus, we need to explicitly pass the path as `systemd-sysusers` will see it.master
parent
1d4d29c294
commit
d44e7df8cf
|
@ -4,7 +4,7 @@ templates = [
|
||||||
dest = "/etc/sysusers.d/nut.conf"
|
dest = "/etc/sysusers.d/nut.conf"
|
||||||
hooks = {
|
hooks = {
|
||||||
changed = [{
|
changed = [{
|
||||||
run = "systemd-sysusers %s"
|
run = "systemd-sysusers /etc/sysusers.d/nut.conf"
|
||||||
immediate = True
|
immediate = True
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue