Created
April 5, 2017 18:27
-
-
Save lordcirth/1555dc7642df5d6a500180b19296de30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
master: {{pillar['common']['salt_master']}} | |
hash_type: sha256 | |
# Salt Mine - retrieves data from minions to master | |
mine_functions: | |
ssh.host_keys: | |
# Only send pubkeys - very important! | |
private: False | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# From gtmanfred on #salt #} | |
{% for minion_id, keys in salt['mine.get']('*', 'ssh.host_keys').items() %} | |
{# assuming that minion_id == fqdn #} | |
{{ minion_id }} {{ keys['ecdsa.pub'] }} | |
{{ minion_id.split('.')[0] }} {{ keys['ecdsa.pub'] }} | |
{{ minion_id }} {{ keys['rsa.pub'] }} | |
{{ minion_id.split('.')[0] }} {{ keys['rsa.pub'] }} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment