bundles/{systemd,hostname}: add hostname control
This commit is contained in:
parent
ae82e9cd51
commit
6656a0864f
6 changed files with 28 additions and 2 deletions
|
@ -3,5 +3,16 @@ actions = {
|
|||
'command': '/usr/bin/systemctl daemon-reload',
|
||||
'cascade_skip': False,
|
||||
'triggered': True,
|
||||
'needed_by': {
|
||||
'svc_systemd:',
|
||||
},
|
||||
},
|
||||
'systemd-hostname': {
|
||||
'command': 'hostnamectl set-hostname {}'.format(node.hostname),
|
||||
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(node.hostname),
|
||||
# Provided by 'hostname' bundle
|
||||
'needs': {
|
||||
'file:/etc/hosts',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue