introduce node.metadata['hostname'] to other bundles, update nodefiles to reflect changes
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-10-25 11:07:23 +01:00
parent de73552700
commit 831545d8b1
Signed by: kunsi
GPG key ID: 12E3D2136B818350
11 changed files with 24 additions and 18 deletions

View file

@ -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',