Skip to content

Instantly share code, notes, and snippets.

@mshade
Created May 29, 2014 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mshade/6e305f6e61d03b60742c to your computer and use it in GitHub Desktop.
Save mshade/6e305f6e61d03b60742c to your computer and use it in GitHub Desktop.
siteuser:
dimeshake:
devs:
- user1
- user2
anothersite:
devs:
- user3
- user4
{% if pillar['siteuser'] is defined %}
{% for usr in salt['pillar.get']('siteuser') %}
# snipped - creation of users, housekeeping for each, etc #
/home/{{ usr }}/.ssh/authorized_keys:
file.append:
- sources:
{% for dev in salt['pillar.get']('{{ usr }}:devs') %}
- salt://users/keys/{{ dev }}
{% endfor %}
{% endfor %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment