Skip to content
Snippets Groups Projects
Commit eaba0903 authored by David Mehren's avatar David Mehren
Browse files

Merge branch 'linting' into 'master'

Add ansible-lint and fix all warnings and errors

See merge request !2
parents 9dbce5db b92732f6
No related branches found
No related tags found
1 merge request!2Add ansible-lint and fix all warnings and errors
Pipeline #89595 passed
--- ---
stages: stages:
- linting - linting
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache: cache:
paths: paths:
- .cache - .cache
ansible-lint: ansible-lint:
stage: linting stage: linting
image: registry.gitlab.com/pipeline-components/ansible-lint:latest image:
before_script: name: registry.gitlab.fachschaften.org/fsi-ansible/ci-docker-image:latest
- pip3 install yamllint entrypoint: [""]
script: script:
- ansible-lint . - ansible-lint -v --offline
--- ---
- name: reload netdata alarms - name: reload netdata alarms
command: killall -USR2 netdata ansible.builtin.command: killall -USR2 netdata
...@@ -3,7 +3,7 @@ galaxy_info: ...@@ -3,7 +3,7 @@ galaxy_info:
author: Fachschaft Informatik, TU Dortmund author: Fachschaft Informatik, TU Dortmund
description: Install and configure a netdata server description: Install and configure a netdata server
license: MIT license: MIT
min_ansible_version: 2.9 min_ansible_version: "2.9"
platforms: platforms:
- name: Ubuntu - name: Ubuntu
versions: versions:
......
--- ---
- name: Copy netdata cofig - name: Copy netdata cofig
template: ansible.builtin.template:
src: netdata.conf.j2 src: netdata.conf.j2
dest: /etc/netdata/netdata.conf dest: /etc/netdata/netdata.conf
owner: root owner: root
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
notify: restart netdata notify: restart netdata
- name: Copy netdata stream config - name: Copy netdata stream config
template: ansible.builtin.template:
src: stream.conf.j2 src: stream.conf.j2
dest: /etc/netdata/stream.conf dest: /etc/netdata/stream.conf
owner: root owner: root
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
notify: restart netdata notify: restart netdata
- name: Copy health override config - name: Copy health override config
copy: ansible.builtin.copy:
src: "{{ item }}" src: "{{ item }}"
dest: /etc/netdata/health.d/ dest: /etc/netdata/health.d/
owner: root owner: root
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
notify: reload netdata alarms notify: reload netdata alarms
- name: Copy last_collected alert config - name: Copy last_collected alert config
template: ansible.builtin.template:
dest: "/etc/netdata/health.d/last_collected.conf" dest: "/etc/netdata/health.d/last_collected.conf"
src: "last_collected.conf.j2" src: "last_collected.conf.j2"
owner: root owner: root
...@@ -40,12 +40,12 @@ ...@@ -40,12 +40,12 @@
notify: reload netdata alarms notify: reload netdata alarms
- name: Enable netdata - name: Enable netdata
service: ansible.builtin.service:
name: netdata name: netdata
enabled: true enabled: true
- name: Copy original health_alarm_notify.conf - name: Copy original health_alarm_notify.conf
copy: ansible.builtin.copy:
src: /usr/lib/netdata/conf.d/health_alarm_notify.conf src: /usr/lib/netdata/conf.d/health_alarm_notify.conf
remote_src: true remote_src: true
dest: /etc/netdata/health_alarm_notify.conf dest: /etc/netdata/health_alarm_notify.conf
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
mode: 0644 mode: 0644
- name: Set email sender - name: Set email sender
lineinfile: ansible.builtin.lineinfile:
path: /etc/netdata/health_alarm_notify.conf path: /etc/netdata/health_alarm_notify.conf
regexp: "^EMAIL_SENDER=\".*\"" regexp: "^EMAIL_SENDER=\".*\""
line: "EMAIL_SENDER=\"{{ netdata_from_email }}\"" line: "EMAIL_SENDER=\"{{ netdata_from_email }}\""
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
notify: reload netdata alarms notify: reload netdata alarms
- name: Set email recipient - name: Set email recipient
lineinfile: ansible.builtin.lineinfile:
path: /etc/netdata/health_alarm_notify.conf path: /etc/netdata/health_alarm_notify.conf
regexp: "^DEFAULT_RECIPIENT_EMAIL=\".*\"" regexp: "^DEFAULT_RECIPIENT_EMAIL=\".*\""
line: "DEFAULT_RECIPIENT_EMAIL=\"{{ netdata_to_email }}\"" line: "DEFAULT_RECIPIENT_EMAIL=\"{{ netdata_to_email }}\""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment