Newer
Older
option: '{{ item.option }}'
value: '{{ item.value }}'
with_items:
value: '{{ (netdata_registry|default("pmon1") == inventory_hostname)|ternary("yes", "no") }}'
value: 'http://{{ netdata_registry|default("pmon1") }}:19999'
dest: /etc/netdata/{{ item }}
owner: netdata
group: netdata
- health_alarm_notify.conf
- python.d.conf
dest: /etc/netdata/python.d/{{ item }}
owner: netdata
group: netdata
- name: Get a list of all health config files
shell: ls /usr/lib/netdata/conf.d/health.d/*.conf -1
- name: Remove all options that prevent clear notifications
lineinfile:
path: '{{ item }}'
state: absent
with_items: '{{ health_list.stdout_lines }}'
regexp: 'killproc -p \$\{PIDFILE\} \$DAEMON_PATH/\$DAEMON'
line: ' killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON && sleep 3'
stat:
path: /sys/kernel/mm/ksm
register: ksm
# Note: copy module doesn't work here because parent directory /sys
# is not writable, not even by root
shell: echo {{ item.value }} >/sys/kernel/mm/ksm/{{ item.file }}
with_items:
- file: run
value: 1
- file: sleep_millisecs
value: 1000