restart salt-minion instead of start.
Packages on debian/ubuntu should start on installation. As a result, if we want to get config changes we've inserted to be read, we need to restart. Note one interesting thing here. upstart considers 'restart' as "restart only if currently running", while 'service' considers restart to be "stop if running, then start". So the use of 'service' here is important, rather than just 'restart'
This commit is contained in:
parent
d4f039849a
commit
f599e720c7
@ -56,5 +56,6 @@ def handle(name, cfg, cloud, log, _args):
|
||||
util.write_file(pub_name, salt_cfg['public_key'])
|
||||
util.write_file(pem_name, salt_cfg['private_key'])
|
||||
|
||||
# Start salt-minion
|
||||
util.subp(['service', 'salt-minion', 'start'], capture=False)
|
||||
# restart salt-minion. 'service' will start even if not started. if it
|
||||
# was started, it needs to be restarted for config change.
|
||||
util.subp(['service', 'salt-minion', 'restart'], capture=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user