--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Otherwise, what process do you use to switch from DHCP to STATIC? Maybe removing minion_id at that point is more doable?
You need to rename the key in /etc/salt/pki/master/minions to match the new minion id. You can also reconfigure minions via pillar. The minion_id key in the config will override the minion_id file.
(I think that's the path.. It's close, if not.
-S
--
# rename hostname.test.com into hostname as minion id.
# as root user on salt-master
export HN=hostname
salt $HN.test.com test.ping && salt $HN.test.com cmd.run 'hostname > /etc/salt/minion_id'
salt $HN.test.com service.restart salt-minion
mv -f /etc/salt/pki/master/minions/$HN.test.com /etc/salt/pki/master/minions/$HN
salt $HN test.ping # check if new host works