introduce node.metadata['hostname'] to other bundles, update nodefiles to reflect changes
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
de73552700
commit
831545d8b1
11 changed files with 24 additions and 18 deletions
|
@ -1,8 +1,3 @@
|
|||
if 'hostname' in node.metadata:
|
||||
hostname = node.metadata['hostname']
|
||||
else:
|
||||
hostname = node.hostname
|
||||
|
||||
actions = {
|
||||
'systemd-reload': {
|
||||
'command': 'systemctl daemon-reload',
|
||||
|
@ -13,8 +8,8 @@ actions = {
|
|||
},
|
||||
},
|
||||
'systemd-hostname': {
|
||||
'command': 'hostnamectl set-hostname {}'.format(hostname),
|
||||
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(hostname),
|
||||
'command': 'hostnamectl set-hostname {}'.format(node.metadata['hostname']),
|
||||
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(node.metadata['hostname']),
|
||||
# Provided by 'hostname' bundle
|
||||
'needs': {
|
||||
'file:/etc/hosts',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue