Skip to content

Commit

Permalink
Merge pull request #282 from rocket-labs-sysadmins/beacons
Browse files Browse the repository at this point in the history
Added beacon configuration support
  • Loading branch information
aboe76 authored Jan 13, 2017
2 parents f58562b + fc40847 commit 9e42d32
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
16 changes: 15 additions & 1 deletion pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ salt:
auth_keytab: /root/auth.keytab
auth_principal: kadmin/admin

# optional engine configuration
# optional engine configuration
engines:
slack:
token: xoxp-XXXXX-XXXXXXX
Expand All @@ -157,6 +157,20 @@ salt:
type: runner
cmd: jobs.list_jobs

# optional beacons configuration
beacons:
load:
1m:
- 0.0
- 2.0
5m:
- 0.0
- 1.5
15m:
- 0.1
- 1.0
interval: 10


# salt cloud config
cloud:
Expand Down
9 changes: 9 additions & 0 deletions salt/files/minion.d/beacons.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# This file is managed by Salt! Do not edit by hand!
#
{%- set beacons = salt['pillar.get']('salt:beacons') -%}
{%- set beacons = salt['pillar.get']('salt:minion:beacons', default=beacons, merge=True) -%}
{%- if beacons %}
beacons:
{{ beacons | yaml(False) | indent(2) }}
{%- endif -%}
2 changes: 1 addition & 1 deletion salt/files/minion.d/f_defaults.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file managed by Salt, do not edit by hand!!
# Based on salt version 2015.8.7 default config
#
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines'] -%}
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines', 'beacons'] -%}
{% set cfg_salt = pillar.get('salt', {}) -%}
{% set cfg_minion = cfg_salt.get('minion', {}) -%}
{% set default_keys = [] -%}
Expand Down

0 comments on commit 9e42d32

Please sign in to comment.