🚨: fix ansible-lint
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m29s
All checks were successful
ansible-lint / lint-everything (push) Successful in 1m29s
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
- name: Check if .my.cnf file exists
|
||||
ansible.builtin.stat:
|
||||
path: /root/.my.cnf
|
||||
register: dot_my_cnf
|
||||
register: mariadb_dot_my_cnf
|
||||
|
||||
- name: Set root password
|
||||
community.mysql.mysql_user:
|
||||
@@ -44,7 +44,7 @@
|
||||
host: localhost
|
||||
name: root
|
||||
password: "{{ mariadb_root_pass }}"
|
||||
when: not dot_my_cnf.stat.exists
|
||||
when: not mariadb_dot_my_cnf.stat.exists
|
||||
|
||||
- name: Put .my.cnf file
|
||||
ansible.builtin.template:
|
||||
|
@@ -2,23 +2,23 @@
|
||||
|
||||
- name: Set package fact
|
||||
ansible.builtin.set_fact:
|
||||
muninpkgs:
|
||||
munin_client_muninpkgs:
|
||||
- muninlite
|
||||
munin_need_reconfigure: false
|
||||
munin_client_munin_need_reconfigure: false
|
||||
when: ansible_facts['distribution'] == "LEDE" or ansible_facts['distribution'] == "OpenWRT" or ansible_facts['distribution'] == "OpenWrt"
|
||||
|
||||
- name: Set other packages fact
|
||||
ansible.builtin.set_fact:
|
||||
muninpkgs:
|
||||
munin_client_muninpkgs:
|
||||
- munin-node
|
||||
- munin-plugins-core
|
||||
- munin-plugins-extra
|
||||
munin_need_reconfigure: true
|
||||
munin_client_munin_need_reconfigure: true
|
||||
when: ansible_facts['distribution'] == "Debian"
|
||||
|
||||
- name: Install munin node packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ muninpkgs }}"
|
||||
name: "{{ munin_client_muninpkgs }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
mode: "0o644"
|
||||
notify:
|
||||
- Restart munin-node
|
||||
when: munin_need_reconfigure
|
||||
when: munin_client_munin_need_reconfigure
|
||||
|
||||
## Adding modules for specific functions
|
||||
# for NginX webservers
|
||||
@@ -98,14 +98,14 @@
|
||||
changed_when: true
|
||||
notify:
|
||||
- Restart munin-node
|
||||
when: munin_need_reconfigure
|
||||
when: munin_client_munin_need_reconfigure
|
||||
|
||||
# Useless junks for everyone
|
||||
- name: Delete useless junks for everyone
|
||||
ansible.builtin.file:
|
||||
path: "/etc/munin/plugins/{{ item }}"
|
||||
state: absent
|
||||
when: munin_need_reconfigure
|
||||
when: munin_client_munin_need_reconfigure
|
||||
loop:
|
||||
- users
|
||||
|
||||
|
@@ -5,14 +5,14 @@
|
||||
|
||||
- name: Detect systemd-resolve
|
||||
ansible.builtin.set_fact:
|
||||
_systemd_resolve_enable: "{{ ansible_facts.udp_listen | selectattr('port', 'eq', 53) | selectattr('name', 'eq', 'systemd-resolve') | count > 0 }}"
|
||||
nsd_systemd_resolve_enable: "{{ ansible_facts.udp_listen | selectattr('port', 'eq', 53) | selectattr('name', 'eq', 'systemd-resolve') | count > 0 }}"
|
||||
|
||||
- name: Deactivate DNS stublistener
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/systemd/resolved.conf
|
||||
regex: '^#DNSStubListener=yes'
|
||||
line: DNSStubListener=no
|
||||
when: _systemd_resolve_enable
|
||||
when: nsd_systemd_resolve_enable
|
||||
notify:
|
||||
- Restart systemd-resolved
|
||||
|
||||
|
@@ -55,14 +55,14 @@
|
||||
- name: Stat associated keys
|
||||
ansible.builtin.stat:
|
||||
path: "{{ nsd_default_etc_path }}/keys/{{ item.name }}/.ds"
|
||||
register: _stat_keys
|
||||
register: nsd_stat_keys
|
||||
|
||||
- name: Sign zone file
|
||||
become: true
|
||||
become_user: nsd
|
||||
ansible.builtin.command:
|
||||
chdir: "{{ nsd_default_etc_path }}/keys/{{ item.name }}/"
|
||||
cmd: "ldns-signzone -o {{ item.name }} -u {{ nsd_default_etc_path }}/zones/{{ item.name }}.zone {{ (_stat_keys.stat.lnk_target | split('.'))[:-1] | join('.') }}"
|
||||
cmd: "ldns-signzone -o {{ item.name }} -u {{ nsd_default_etc_path }}/zones/{{ item.name }}.zone {{ (nsd_stat_keys.stat.lnk_target | split('.'))[:-1] | join('.') }}"
|
||||
changed_when: true
|
||||
|
||||
- name: Reload zone
|
||||
|
@@ -10,5 +10,5 @@
|
||||
|
||||
- name: Set default CA
|
||||
ansible.builtin.command: /etc/x509/acme.sh --set-default-ca --server letsencrypt
|
||||
register: acme_output
|
||||
changed_when: acme_output.rc != 0
|
||||
register: x509_acme_output
|
||||
changed_when: x509_acme_output.rc != 0
|
||||
|
Reference in New Issue
Block a user