1 # Copyright 2018-2021 Intel Corporation, Anuket and others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 - name: Clean collectd config dir path
21 path: "{{ config_file_dir }}"
26 - name: Create collectd.d folder on remote host
28 path: "{{ config_file_dir }}"
34 - name: enable capabilities plugin
35 import_tasks: capabilities.yml
37 - name: enable csv plugin
40 - name: enable default plugins
41 import_tasks: default_read_import.yml
43 - name: enable dpdk plugins
44 import_tasks: dpdk.yml
46 - name: enable exec plugin
47 import_tasks: exec.yml
49 - name: enable hugepages plugin
50 import_tasks: hugepages.yml
52 - name: enable kafka plugin
53 import_tasks: kafka.yml
55 - name: enable logfile plugin
56 import_tasks: logfile.yml
58 - name: enable logparser plugin
59 import_tasks: logparser.yml
61 - name: enable mcelog plugin
62 import_tasks: mcelog.yml
64 - name: enable network plugin
65 import_tasks: network.yml
67 - name: enable prometheus plugin
68 import_tasks: prometheus.yml
69 when: groups['prometheus_hosts'] is defined
71 - name: enable pmu plugin
74 - name: enable rdt plugin
77 - name: enable rddtool plugin
78 import_tasks: rrdtool.yml
80 - name: enable snmp_agent plugin
81 import_tasks: snmp_agent.yml
83 - name: enable syslog plugin
84 import_tasks: syslog.yml
86 - name: enable virt plugin
87 import_tasks: virt.yml
89 - name: enable ipmi plugin
92 - name: enable uuid plugin
95 - name: configure plugins
99 collectd_conf_output_dir: /tmp/collectd.conf.d
104 - name: "Copy the generated plugin configs"
106 sudo cp /tmp/collectd.conf.d/*.conf {{ config_file_dir }} && sudo cp /tmp/collectd.conf {{ config_file_dir }}/../collectd.conf
111 - name: Update config file location
113 path: "{{ config_file_dir }}../collectd.conf"
114 regexp: "^(.*)/tmp/collectd.conf.d(.*)$"
115 line: '\1{{ config_file_dir }}\2'
121 - name: copy additional config files
122 include: additional_configs.yml