Created
February 24, 2017 20:46
-
-
Save anonymous/cf0090afd32a82854c2c8e14e861cdb9 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
# pillar data | |
local_users: | |
myuser: | |
youruser: | |
password: 'hashedpassword' | |
# state | |
{% for login, user in pillar.get('local_users', {}).items() %} | |
{{ login }}: | |
user.present: | |
- name: {{ login }} | |
{% if 'password' in pillar %} | |
- shell: '/bin/bash' | |
- password: {{ login.password }} | |
{% endif %} | |
{% endfor %} |
gtmanfred
commented
Feb 24, 2017
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment