Skip to content

Commit

Permalink
Merge pull request #99 from aboe76/mine_get_master
Browse files Browse the repository at this point in the history
add mine_get function to master config
  • Loading branch information
nmadhok committed Feb 19, 2015
2 parents ed0f2fa + b8e5377 commit cde11bc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions salt/files/master.d/_defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,30 @@ peer_run:
# The example below enables minion foo.example.com to get 'network.interfaces' mine
# data only, minions web* to get all network.* and disk.* mine data and all other
# minions won't get any mine data.
{% if 'mine_get' in cfg_master -%}
mine_get:
{%- for minion, data in cfg_master['mine_get']|dictsort %}
{{ minion }}:
{%- for command in data %}
- {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
{%- endfor -%}
{%- endfor -%}
{% elif 'mine_get' in cfg_salt -%}
mine_get:
{%- for minion, data in cfg_salt['mine_get']|dictsort %}
{{ minion }}:
{%- for command in data %}
- {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
{%- endfor -%}
{%- endfor -%}
{% else -%}
# mine_get:
# foo.example.com:
# - network.interfaces
# web.*:
# - network.*
# - disk.*
{%- endif %}


##### Logging settings #####
Expand Down

0 comments on commit cde11bc

Please sign in to comment.