Skip to content

Instantly share code, notes, and snippets.

@jwineinger
Created December 19, 2013 00:26
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 jwineinger/8032282 to your computer and use it in GitHub Desktop.
Save jwineinger/8032282 to your computer and use it in GitHub Desktop.
include:
- requirements
nodejs:
pkg.installed
statsd:
git.latest:
- name: https://github.com/etsy/statsd.git
- rev: v0.7.0
- target: {{ pillar['statsd_path'] }}
- user: {{ pillar['statsd_user'] }}
- require:
- user: {{ pillar['statsd_user'] }}
- pkg: git
user.present:
- name: {{ pillar['statsd_user'] }}
- shell: /bin/false
- home: /home/{{ pillar['statsd_user'] }}
- createhome: True
- gid_from_name: True
file.managed:
- name: /etc/init/statsd.conf
- source: salt://statsd/statsd-upstart
- template: jinja
- user: root
- group: root
- mode: 755
service.running:
- watch:
- file: {{ pillar['statsd_config'] }}
- require:
- user: {{ pillar['statsd_user'] }}
- file: /etc/init/statsd.conf
/home/{{ pillar['statsd_user'] }}:
file.directory:
- user: {{ pillar['statsd_user'] }}
- group: {{ pillar['statsd_user'] }}
- mode: 775
- require:
- user: statsd
{{ pillar['statsd_config'] }}:
file.managed:
- source: salt://statsd/localConfig.js
- user: statsd
- group: statsd
- mode: 644
- require:
- user: statsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment