Skip to content

Instantly share code, notes, and snippets.

@whytewolf
Created August 4, 2017 23:37
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 whytewolf/7a113e8a748bb150aa6c97bb35df9929 to your computer and use it in GitHub Desktop.
Save whytewolf/7a113e8a748bb150aa6c97bb35df9929 to your computer and use it in GitHub Desktop.
{%- import_yaml "testing/defaults.yaml" as defaults %}
{%- for username, user in salt.pillar.get('acme_sh', {}).items() %}
{% set userconf = salt.grains.filter_by(defaults,default='userconf',merge=user)%}
test_{{ username }}_defaults:
test.configurable_test_state:
- changes: False
- comment: "{{ defaults }}"
test_{{ username }}_defaults_userconf:
test.configurable_test_state:
- changes: False
- comment: "{{ defaults['userconf'] }}"
test_{{ username }}_userconf_updated:
test.configurable_test_state:
- changes: False
- comment: "{{ userconf }}"
{%- endfor -%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment