From f1ce3290c9e26b08a8252f9ec7784f51bf424fad Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 14:45:45 +0100 Subject: [PATCH 01/11] :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 ... -- 2.45.2 From a02afd20b7367132a07b53f2d7cd8786e2272bc0 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:40:58 +0100 Subject: [PATCH 02/11] :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: -- 2.45.2 From da1fa70e55168336b0368b8a6d21e0b7d9f5977c Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:10 +0100 Subject: [PATCH 03/11] :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 -- 2.45.2 From 3840fdd44e6b72bcba9dee74237f744524e77af1 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:54 +0100 Subject: [PATCH 04/11] :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: -- 2.45.2 From 15ae83566c796012651f29219addfd8491f8f343 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:43:52 +0100 Subject: [PATCH 05/11] :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 }}" -- 2.45.2 From def64380e67a6a29d8fae3b38fff2a226ce3eefe Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 14:45:45 +0100 Subject: [PATCH 06/11] :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 ... -- 2.45.2 From 008fb803d975ca93bdd838566a4bacc85174f4d7 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:40:58 +0100 Subject: [PATCH 07/11] :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: -- 2.45.2 From 1fe440aabe2735cb2318ccc5f2f9e8d764944d5b Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:10 +0100 Subject: [PATCH 08/11] :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 -- 2.45.2 From 902d219de3e8fbaf1a8a22c7e2bae4da7d8e8248 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:54 +0100 Subject: [PATCH 09/11] :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: -- 2.45.2 From 54aec3638f795a902fb25ec0a12f5ebbe591878e Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:43:52 +0100 Subject: [PATCH 10/11] :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 }}" -- 2.45.2 From f39ade227a2597b09be5a58d173f6d4c4bc0815a Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 18:22:19 +0100 Subject: [PATCH 11/11] :memo: add CI badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 00897a4..cb8683f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Linter Status](https://drone.auro.re/api/badges/Aurore/ansible/status.svg)](https://drone.auro.re/Aurore/ansible) + # Recettes Ansible d'Aurore Ensemble des recettes de déploiement Ansible pour les serveurs d'Aurore. -- 2.45.2