From b19c768e3b4d924f4fb9cf5651b729955941c37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Tue, 22 Oct 2024 11:54:42 +0200 Subject: [PATCH 1/2] Refs #8025: Refactor-awx - Bacula task - no log true to hide stdout --- roles/debian-base/tasks/bacula.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/debian-base/tasks/bacula.yml b/roles/debian-base/tasks/bacula.yml index de9a3b4..7118b04 100644 --- a/roles/debian-base/tasks/bacula.yml +++ b/roles/debian-base/tasks/bacula.yml @@ -16,6 +16,7 @@ set_fact: bacula_passwords: {} - name: Convert lines to individual variables generating a new dict + no_log: true set_fact: bacula_passwords: "{{ bacula_passwords | combine({item.split(':')[0].lower(): item.split(':')[1] | regex_replace('\\n$', '') }) }}" loop: "{{ passwords }}" -- 2.40.1 From aa27df5ff0a6679f736765dbcd5d442641959dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Tue, 22 Oct 2024 12:16:03 +0200 Subject: [PATCH 2/2] Refs #8025: Refactor-awx - Bacula task - no log true to hide stdout in more tasks --- roles/debian-base/tasks/bacula.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/debian-base/tasks/bacula.yml b/roles/debian-base/tasks/bacula.yml index 7118b04..3958dbd 100644 --- a/roles/debian-base/tasks/bacula.yml +++ b/roles/debian-base/tasks/bacula.yml @@ -7,9 +7,11 @@ src: /etc/bacula/common_default_passwords register: file_content - name: Going to text plane + no_log: true set_fact: file_content_decoded: "{{ file_content.content | b64decode }}" - name: Extracting passwords + no_log: true set_fact: passwords: "{{ file_content_decoded.splitlines() | select('match', '^[^#]') | map('regex_replace', '^([^=]+)=(.+)$', '\\1:\\2') | list }}" - name: Initialize password dictionary -- 2.40.1