Created
April 16, 2014 22:38
-
-
Save UtahDave/10939584 to your computer and use it in GitHub Desktop.
Create Salt-SSH Roster from current regular minions
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
salt '*' --out=txt cmd.run template=jinja "printf '{{ grains.id }}:\n host: {{ grains.fqdn }}\n user: yourname\n priv: /path/to/id_rsa\n sudo: false'" | awk -F':' '{ st = index($0,":")+1;print substr($0,st+1)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment