Skip to content
Snippets Groups Projects
Commit 042c877f authored by nimrod's avatar nimrod
Browse files

More work on Collectd, stil WIP.

parent 6665987b
No related branches found
No related tags found
No related merge requests found
...@@ -23,16 +23,37 @@ ...@@ -23,16 +23,37 @@
file: file:
path: /etc/collectd/collectd.conf.d/ path: /etc/collectd/collectd.conf.d/
owner: root owner: root
group: root group: '{{ root_group[ansible_os_family] }}'
mode: '0755' mode: '0755'
state: directory state: directory
- name: Base configuration - name: Gather Collectd facts
collectd_facts:
- name: Base Collectd configuration
copy: copy:
src: collectd.conf src: collectd.conf
dest: /etc/collectd/collectd.conf dest: /etc/collectd/collectd.conf
owner: root owner: root
group: root group: '{{ root_group[ansible_os_family] }}'
mode: '0644'
notify:
- Restart Collectd
- name: Default Collectd configuration
with_fileglob:
- template/collectd/*.j2
template:
src: '{{ item }}'
dest: /etc/collectd/collectd.conf.d/
owner: root
group: '{{ root_group[ansible_os_family] }}'
mode: '0644' mode: '0644'
notify: notify:
- Restart Collectd - Restart Collectd
- name: Enabled Collectd service
service:
name: collectd
state: started
enabled: yes
{% if collectd_collectd_server is defined %}
{% elif collectd_riemann_server is defined and (collectd['major'] > 5 or
(collectd['major'] == 5 and collectd['minor'] >= 3)) %}
{% elif collectd_graphite_server is defined and (collectd['major'] > 5 or
(collectd['major'] == 5 and collectd['minor'] >= 1)) %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment