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_force_reset: false
netdata_force_reset: no
netdata_fluentd_buffer:
green: 75
red: 100
......
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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
---
# 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
......@@ -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:
......
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