diff options
Diffstat (limited to 'docker/ansible/roles/config_files/tasks/main.yml')
-rw-r--r-- | docker/ansible/roles/config_files/tasks/main.yml | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml index 4a25e4eb..9b241890 100644 --- a/docker/ansible/roles/config_files/tasks/main.yml +++ b/docker/ansible/roles/config_files/tasks/main.yml @@ -83,12 +83,21 @@ - name: enable syslog plugin import_tasks: syslog.yml +- name: enable ovs plugins + import_tasks: ovs.yml + - name: enable virt plugin import_tasks: virt.yml - name: enable ipmi plugin include: ipmi.yml +- name: Enable unixsock plugin + set_fact: + collectd_plugins: "{{ collectd_plugins | union(['unixsock']) | unique }}" + tags: + - unixsock + - name: enable uuid plugin include: uuid.yml @@ -101,13 +110,23 @@ - always - en_default_all -- name: "Copy the generated plugin configs" - shell: - sudo cp /tmp/collectd.conf.d/*.conf {{ config_file_dir }} && sudo cp /tmp/collectd.conf {{ config_file_dir }}/../collectd.conf +- name: Copy the generated plugin configs + copy: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + with_items: + - { src: "/tmp/collectd.conf.d/", dest: "{{ config_file_dir }}" } + - { src: "/tmp/collectd.conf", dest: "{{ config_file_dir }}/../collectd.conf" } tags: - always - en_default_all +- name: Update TypesDB location + lineinfile: + path: "{{ config_file_dir }}../collectd.conf" + regexp: '^TypesDB "/usr/share/collectd/types.db"$' + line: 'TypesDB "/opt/collectd/share/collectd/types.db"' + - name: Update config file location lineinfile: path: "{{ config_file_dir }}../collectd.conf" |