Skip to content
Snippets Groups Projects
Commit aad99ffa authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent c47362e8
No related branches found
No related tags found
No related merge requests found
---
netdata_version: v1.15.0 netdata_version: v1.15.0
netdata_force_reset: false netdata_force_reset: no
netdata_fluentd_buffer: netdata_fluentd_buffer:
green: 75 green: 75
red: 100 red: 100
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
- name: Patch Startup Script - name: Patch Startup Script
lineinfile: lineinfile:
dest: /etc/init.d/netdata dest: /etc/init.d/netdata
regexp: killproc -p \$\{PIDFILE\} \$DAEMON_PATH/\$DAEMON regexp: 'killproc -p \$\{PIDFILE\} \$DAEMON_PATH/\$DAEMON'
line: killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON && sleep 3 line: ' killproc -p ${PIDFILE} $DAEMON_PATH/$DAEMON && sleep 3'
when: ansible_lsb.major_release == '12' when: ansible_lsb.major_release == '12'
- name: Check if KSM is available - name: Check if KSM is available
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
- name: Crontab for heartbeat - name: Crontab for heartbeat
cron: cron:
name: Heartbeat 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: tags:
- cron - cron
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: Clone NetData - name: Clone NetData
git: git:
accept_hostkey: true accept_hostkey: yes
repo: "https://github.com/netdata/netdata.git" repo: "https://github.com/netdata/netdata.git"
dest: "/opt/netdata" dest: "/opt/netdata"
force: yes force: yes
......
...@@ -9,30 +9,30 @@ ...@@ -9,30 +9,30 @@
- block: - 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 - import_tasks: apache.yml
when: groups['webserver'] is defined and inventory_hostname in groups['webserver'] when: groups['webserver'] is defined and inventory_hostname in groups['webserver']
- import_tasks: elasticsearch.yml - import_tasks: elasticsearch.yml
when: groups['logserver'] is defined and inventory_hostname in groups['logserver'] when: groups['logserver'] is defined and inventory_hostname in groups['logserver']
- import_tasks: haproxy.yml - import_tasks: haproxy.yml
when: groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver'] when: groups['proxyserver'] is defined and inventory_hostname in groups['proxyserver']
- import_tasks: mysql.yml - import_tasks: mysql.yml
when: groups['dbserver_mysql'] is defined and inventory_hostname in groups['dbserver_mysql'] 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 - import_tasks: varnish.yml
when: groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver'] when: groups['varnishserver'] is defined and inventory_hostname in groups['varnishserver']
- import_tasks: heartbeat.yml - import_tasks: heartbeat.yml
when: netdata_heartbeat|default(true) when: netdata_heartbeat|default(true)
when: not excluded_roles or "netdata" not in excluded_roles when: not excluded_roles or "netdata" not in excluded_roles
--- ---
# file: roles/netdata/tasks/mysql.yml # file: roles/netdata/tasks/mysql.yml
- name: Configure Plugin: MySQL - name: Configure Plugin MySQL
replace: replace:
dest: /usr/lib/netdata/conf.d/python.d/mysql.conf dest: /usr/lib/netdata/conf.d/python.d/mysql.conf
regexp: #[\s]*pass[\s]*:[\s]*'''' regexp: '#[\s]*pass[\s]*:[\s]*'''''
replace: pass : ''{{ mysql_root_password|default("root") }}'' replace: 'pass : ''{{ mysql_root_password|default("root") }}'''
notify: notify:
- Restart NetData - Restart NetData
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
- name: Make alerts silent - name: Make alerts silent
replace: replace:
dest: /usr/lib/netdata/conf.d/health.d/{{ item }}.conf dest: /usr/lib/netdata/conf.d/health.d/{{ item }}.conf
regexp: to: .*$ regexp: ' to: .*$'
replace: to: silent replace: ' to: silent'
backup: yes backup: yes
with_items: '{{ netdata_silent_alerts }}' with_items: '{{ netdata_silent_alerts }}'
notify: notify:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment