Skip to content

Instantly share code, notes, and snippets.

@UtahDave
Created April 16, 2014 22:38
Show Gist options
  • Save UtahDave/10939584 to your computer and use it in GitHub Desktop.
Save UtahDave/10939584 to your computer and use it in GitHub Desktop.
Create Salt-SSH Roster from current regular minions
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