From f1ce3290c9e26b08a8252f9ec7784f51bf424fad Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 14:45:45 +0100 Subject: [PATCH 1/5] :construction_worker: do not ansible-lint the vault and fix useless rules --- .ansible-lint | 7 ++++++- .yamllint.yml | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 3ec97ed..d98efd4 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,5 +1,10 @@ skip_list: - - 'no-changed-when' + - no-changed-when + - load-failure + - document-start warn_list: - experimental # all rules tagged as experimental + +exclude_paths: +- group_vars/all/vault.yml diff --git a/.yamllint.yml b/.yamllint.yml index c8666c8..af15be3 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -6,6 +6,5 @@ rules: max: 120 level: warning document-start: - ignore: | - /groups_var/all/vault.yml + ignore: group_vars/all/vault.yml ... From a02afd20b7367132a07b53f2d7cd8786e2272bc0 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:40:58 +0100 Subject: [PATCH 2/5] :rotating_light: fix risky-file-permission --- utils/reboot_needed_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/reboot_needed_check.yml b/utils/reboot_needed_check.yml index 4f48a3d..cf7868f 100755 --- a/utils/reboot_needed_check.yml +++ b/utils/reboot_needed_check.yml @@ -8,6 +8,7 @@ dest: /tmp/ansible_dump_reboot_needed.txt content: "" force: true + mode: 0644 - hosts: all,!unifi,!escalope.adm.auro.re,!loki.adm.auro.re,!viviane.adm.auro.re,!vpn-ovh.adm.auro.re tasks: From da1fa70e55168336b0368b8a6d21e0b7d9f5977c Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:10 +0100 Subject: [PATCH 3/5] :rotating_light: fix empty-string-compare --- utils/reboot_needed_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/reboot_needed_check.yml b/utils/reboot_needed_check.yml index cf7868f..631d496 100755 --- a/utils/reboot_needed_check.yml +++ b/utils/reboot_needed_check.yml @@ -20,7 +20,7 @@ - name: DEBUG debug: msg: "{{ ansible_facts['nodename'] }} : {{ result.stdout }}" - when: result.stdout != "" + when: result.stdout is defined # Add info line by line - name: Dump all info into the local file @@ -28,4 +28,4 @@ lineinfile: path: /tmp/ansible_dump_reboot_needed.txt line: "{{ ansible_facts['nodename'] }} : {{ result.stdout }}" - when: result.stdout != "" + when: result.stdout is defined From 3840fdd44e6b72bcba9dee74237f744524e77af1 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:54 +0100 Subject: [PATCH 4/5] :rotating_light: fix risky-file-permission --- utils/version_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/version_check.yml b/utils/version_check.yml index b543053..e0c9ad7 100755 --- a/utils/version_check.yml +++ b/utils/version_check.yml @@ -8,6 +8,7 @@ dest: /tmp/ansible_dump_reboot_needed.txt content: "" force: true + mode: 0644 - hosts: all,!unifi tasks: From 15ae83566c796012651f29219addfd8491f8f343 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:43:52 +0100 Subject: [PATCH 5/5] :rotating_light: fix var-spacing --- utils/version_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/version_check.yml b/utils/version_check.yml index e0c9ad7..1a8a7c5 100755 --- a/utils/version_check.yml +++ b/utils/version_check.yml @@ -17,5 +17,5 @@ delegate_to: localhost lineinfile: path: /tmp/ansible_dump_dist_version.txt - line: "[{{ ansible_facts['nodename'] }}] {{ansible_fqdn}} : {{ + line: "[{{ ansible_facts['nodename'] }}] {{ ansible_fqdn }} : {{ ansible_distribution }} {{ ansible_distribution_version }}"