diff --git a/defaults/main.yml b/defaults/main.yml index 6c95672cbb1f4d55fba472e1f86d4f1ce34b82ea..b472dcda9d71a1d6e52dfa210dc0d8b4f2e44160 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,7 @@ +--- + netdata_version: v1.15.0 -netdata_force_reset: false +netdata_force_reset: no netdata_fluentd_buffer: green: 75 red: 100 diff --git a/tasks/configure.yml b/tasks/configure.yml index fe52933397cf74158a5f5f8a84beb58c09f6edc7..7a409291ff37d3db882052a3230d99f6d8b28ea1 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -65,8 +65,8 @@ - name: Patch Startup Script lineinfile: dest: /etc/init.d/netdata - regexp: killproc -p \$\{PIDFILE\} \$DAEMON_PATH/\$DAEMON - line: killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON && sleep 3 + regexp: 'killproc -p \$\{PIDFILE\} \$DAEMON_PATH/\$DAEMON' + line: ' killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON && sleep 3' when: ansible_lsb.major_release == '12' - name: Check if KSM is available diff --git a/tasks/heartbeat.yml b/tasks/heartbeat.yml index 5ea2784f84759a289b3ccfb4c7026b7b2dcddf45..a2b3db7d048c49412bac6cb40270dfea1141fa95 100644 --- a/tasks/heartbeat.yml +++ b/tasks/heartbeat.yml @@ -4,6 +4,6 @@ - name: Crontab for heartbeat cron: name: Heartbeat - job: /usr/bin/curl -XPOST {{ netdata_alerta_webhook }}/heartbeat -H ''Authorization: Key {{ netdata_alerta_apikey }}'' -H ''Content-type: application/json'' -d ''{"origin":"{{ inventory_hostname }}","timeout":120,"tags":["environment:{{ netdata_alerta_environment|default(''production'') }}"]}'' >/dev/null 2>&1 + job: '/usr/bin/curl -XPOST {{ netdata_alerta_webhook }}/heartbeat -H ''Authorization: Key {{ netdata_alerta_apikey }}'' -H ''Content-type: application/json'' -d ''{"origin":"{{ inventory_hostname }}","timeout":120,"tags":["environment:{{ netdata_alerta_environment|default(''production'') }}"]}'' >/dev/null 2>&1' tags: - cron diff --git a/tasks/install.yml b/tasks/install.yml index 3fc4aa30ced66ec70c77aef0fe30ddd1df7b3b8d..b8f0e1b22d8a60bd7b544ca74a3af92666715679 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -3,7 +3,7 @@ - name: Clone NetData git: - accept_hostkey: true + accept_hostkey: yes repo: "https://github.com/netdata/netdata.git" dest: "/opt/netdata" force: yes diff --git a/tasks/main.yml b/tasks/main.yml index 8d7c5f32809b9a0e2eaf063ca2026670b8a97193..157cb5187fc8ae94a729a433608511a7a4d8bf4e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,30 +9,30 @@ - block: - - import_tasks: prepare.yml + - import_tasks: prepare.yml - - import_tasks: install.yml + - import_tasks: install.yml - - import_tasks: configure.yml + - import_tasks: configure.yml - - import_tasks: apache.yml - when: groups['webserver'] is defined and inventory_hostname in groups['webserver'] + - import_tasks: apache.yml + when: groups['webserver'] is defined and inventory_hostname in groups['webserver'] - - import_tasks: elasticsearch.yml - when: groups['logserver'] is defined and inventory_hostname in groups['logserver'] + - import_tasks: elasticsearch.yml + when: groups['logserver'] is defined and inventory_hostname in groups['logserver'] - - import_tasks: haproxy.yml - when: groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver'] + - import_tasks: haproxy.yml + when: groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver'] - - import_tasks: mysql.yml - when: groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] + - import_tasks: mysql.yml + when: groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] - - import_tasks: silent.yml + - import_tasks: silent.yml - - import_tasks: varnish.yml - when: groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver'] + - import_tasks: varnish.yml + when: groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver'] - - import_tasks: heartbeat.yml - when: netdata_heartbeat|default(true) + - import_tasks: heartbeat.yml + when: netdata_heartbeat|default(true) when: not excluded_roles or "netdata" not in excluded_roles diff --git a/tasks/mysql.yml b/tasks/mysql.yml index f084cbdd35d1acde77bbec2efc4b777430212e0d..005ea407b6bacfa30eb6fff6a60f12c63436209e 100644 --- a/tasks/mysql.yml +++ b/tasks/mysql.yml @@ -1,10 +1,10 @@ --- # file: roles/netdata/tasks/mysql.yml -- name: Configure Plugin: MySQL +- name: Configure Plugin MySQL replace: dest: /usr/lib/netdata/conf.d/python.d/mysql.conf - regexp: #[\s]*pass[\s]*:[\s]*'''' - replace: pass : ''{{ mysql_root_password|default("root") }}'' + regexp: '#[\s]*pass[\s]*:[\s]*''''' + replace: 'pass : ''{{ mysql_root_password|default("root") }}''' notify: - Restart NetData diff --git a/tasks/silent.yml b/tasks/silent.yml index d637fa3a4dde0086802811807d4be4e30140527f..f0073a1318c29363ef79d35402cce035388fb138 100644 --- a/tasks/silent.yml +++ b/tasks/silent.yml @@ -4,8 +4,8 @@ - name: Make alerts silent replace: dest: /usr/lib/netdata/conf.d/health.d/{{ item }}.conf - regexp: to: .*$ - replace: to: silent + regexp: ' to: .*$' + replace: ' to: silent' backup: yes with_items: '{{ netdata_silent_alerts }}' notify: