Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Last active January 4, 2016 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gravyboat/8609195 to your computer and use it in GitHub Desktop.
Save gravyboat/8609195 to your computer and use it in GitHub Desktop.
includes for apache
apache/init.sls #This is simply our init which starts the service, and sets up this one managed file for the service (this could be broken out further):
apache_service:
service:
- name: {{ pillar['pkgs']['apache'] }}
- enable: True
- running
---------------------------------------------
apache/files.sls #Here we manage our other files:
include apache
apache_conf:
file.managed:
- name: {{ pillar['pkgs_settings']['apache_sites_available'] }}/graphite
- source: salt://graphite_server/files/apache/graphite
- template: jinja
- watch_in:
- service: apache_service
apache_link:
file.symlink:
- name: {{ pillar['pkgs_settings']['apache_sites_enabled'] }}/graphite
- target: {{ pillar['pkgs_settings']['apache_sites_available'] }}/graphite
- require:
- file: apache_conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment