Skip to content

Commit

Permalink
Merge pull request #116 from andrew-vant/mine_functions
Browse files Browse the repository at this point in the history
Added mine_functions to f_defaults.conf.
  • Loading branch information
nmadhok committed Apr 3, 2015
2 parents a11c39c + 2d986ea commit 1f43b96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ salt:
spam: sausage
cheese: bread

# salt mine setup
mine_interval: 60
# mine_functions can be set at the top level of the pillar, and
# that is preferable because it doesn't affect the conf file and
# doesn't require a minion restart. However, you can configure it
# here instead if you really want to.
mine_functions:
network.interface_ip: [eth0]

# salt cloud config
cloud:
master: salt
Expand Down
7 changes: 7 additions & 0 deletions salt/files/minion.d/f_defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ id: {{ cfg_minion['id'] }}
# The default interval is every 60 minutes.
{{ get_config('mine_interval', '60') }}

{%- if 'mine_functions' in cfg_minion %}
mine_functions:
{%- for func, args in cfg_minion['mine_functions'].items() %}
{{ func }}: {{ args }}
{%- endfor %}
{%- endif %}

# To auto recover minions if master changes IP address (DDNS)
# auth_tries: 10
# auth_safemode: False
Expand Down

0 comments on commit 1f43b96

Please sign in to comment.