I am playing around with salt and what my problem is launching instance from Amazon EC2 AMI results minion keys being the same. How do I refresh individual minion to get it's new identity (key)?
Give the following command a try:
sudo salt 'name_of_host_whose_keys_you_wish_to_regenerate' saltutil.regen_keys
Based on user325017's answer.
I adapted this for Ubuntu Bionic Beaver 18.04, since it has systemd:
#!/usr/bin/env bash systemctl stop salt-minion rm /etc/salt/pki/minion/minion.pem rm /etc/salt/pki/minion/minion.pub cat /dev/null > /etc/salt/minion_id systemctl enable salt-minion systemctl start salt-minion