Skip to content

Instantly share code, notes, and snippets.

@jalons

jalons/sls Secret

Created August 20, 2014 14:48
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 jalons/73b6c5022797df626210 to your computer and use it in GitHub Desktop.
Save jalons/73b6c5022797df626210 to your computer and use it in GitHub Desktop.
Getting list of users
{% for username in salt['cmd.run']('ls /home/') %}
{{ username }}_managed_file:
file.managed:
- name: /tmp/{{ username }}
- user: {{ username }}
{% endfor %}
j_managed_file:
file.managed:
- name: /tmp/j
- user: j
a_managed_file:
file.managed:
- name: /tmp/a
- user: a
l_managed_file:
file.managed:
- name: /tmp/l
- user: l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment