This file contains hidden or 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
{# ######################################################################################### #} | |
{# ######################################################################################### #} | |
{# this block of code auto applies salt states to a given minion if they exist on the master #} | |
{% set id = grains['id'] %} | |
{# web01 host id = 'web' cluster id, allow a custom grain or pillar named 'cluster' to override #} | |
{% set cluster = salt['config.get']('cluster', id.split('.')[0].rstrip('0123456789')) %} | |
{# all available states on the master #} | |
{% set states = salt['cp.list_master']() %} |
This file contains hidden or 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
trigger script when updated: | |
file.managed: | |
- name: /usr/local/bin/script.sh | |
- source: salt://script.sh | |
- mode: 700 | |
cmd.wait: | |
- name: /usr/local/bin/script.sh | |
- cwd: /tmp | |
- watch: |
This file contains hidden or 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
base: | |
'*': | |
# account details are available everywhere | |
- users.accounts | |
# ops group data | |
- users.ops | |
# individual users on a given machine | |
- users.nodeusers | |
'web*': |
NewerOlder