Created
February 3, 2016 21:45
-
-
Save mirajavora/b85b0606591bbc8ad90e to your computer and use it in GitHub Desktop.
This file contains 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
--- | |
- name : Install packages | |
apt : name={{item}} state=present | |
with_items : | |
- python-pip | |
- gcc | |
- python-dev | |
tags: | |
- diamond | |
- name : Install Diamond with Pip | |
pip : name={{item}} | |
with_items: | |
- diamond | |
tags: | |
- diamond | |
- name : Create Diamond log directory | |
file : path={{ item }} state=directory owner={{ diamond_user }} group={{ diamond_user }} | |
with_items: | |
- /var/log/diamond/ | |
- /etc/diamond/ | |
tags: | |
- diamond | |
- name : Create diamond.conf file | |
template : src=diamond.conf dest=/etc/diamond/diamond.conf | |
tags: | |
- diamond | |
- name : Add custom collectors | |
copy : src={{ item }} dest=/usr/local/share/diamond/collectors/ owner={{ diamond_user }} group={{ diamond_user }} | |
with_fileglob: | |
- collectors/*.py | |
tags: | |
- diamond | |
- name : Stop Diamond | |
shell : killall diamond | |
ignore_errors: yes | |
tags: | |
- diamond | |
- name : Start Diamond | |
shell : diamond -p /var/run/diamond.pid -c /etc/diamond/diamond.conf | |
tags: | |
- diamond |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment