Last active
February 16, 2016 22:32
-
-
Save jcockhren/6697195 to your computer and use it in GitHub Desktop.
Simple salt example. core.sls is in the same directory as top.sls (that's one way to designate a state file). monitoring state ID is defined in a FILE called "init.sls" in the "monitoring" subdirectory.
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
core: | |
pkg.installed: | |
- pkgs: | |
- htop | |
- vim-nox | |
- git-core | |
- zsh | |
- tmux | |
- git |
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
/etc/apt/sources.list.d/newrelic.list: | |
file.managed: | |
- source: salt://monitoring/newrelic.list | |
- user: root | |
- group: root | |
- mode: 644 | |
newrelic-sysmond: | |
pkgrepo.managed: | |
- humanname: New Relic | |
- name: deb http://apt.newrelic.com/debian/ newrelic non-free | |
- file: /etc/apt/sources.list.d/newrelic.list | |
- keyid: 548C16BF | |
- keyserver: subkeys.pgp.net | |
- require_in: | |
- pkg: newrelic-sysmond | |
pkg: | |
- installed | |
service: | |
- running | |
- enable: True | |
- require: | |
- pkg: newrelic-sysmond | |
- watch: | |
- file: /etc/newrelic/nrsysmond.cfg | |
/etc/newrelic/nrsysmond.cfg: | |
file.managed: | |
- source: salt://monitoring/nrsysmond.cfg | |
- user: root | |
- group: root | |
- mode: 644 | |
- replace: True | |
- template: jinja |
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: | |
'*': | |
- core | |
'* and not G@roles:vagrant': | |
- match: compound | |
- monitoring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment