From f05596f07f1eb62afa6aa1d89c2fd78f27aa2e16 Mon Sep 17 00:00:00 2001 From: ByeonJungHun Date: Wed, 4 Oct 2023 16:26:48 +0900 Subject: [PATCH] pg patch task edit --- ansible.cfg | 1 + roles/cmoa_pgpatch/tasks/main.yml | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index fba5bca..27d062b 100755 --- a/ansible.cfg +++ b/ansible.cfg @@ -4,3 +4,4 @@ roles_path = roles deprecation_warnings = False display_skipped_hosts = no ansible_home = . +stdout_callback = debug diff --git a/roles/cmoa_pgpatch/tasks/main.yml b/roles/cmoa_pgpatch/tasks/main.yml index 8fa1303..990c05b 100644 --- a/roles/cmoa_pgpatch/tasks/main.yml +++ b/roles/cmoa_pgpatch/tasks/main.yml @@ -2,9 +2,11 @@ - name: 1. Get a list of all pods from the namespace shell: kubectl -n "{{ cmoa_namespace }}" get pods --no-headers -o custom-columns=":metadata.name" |grep postgres register: pod_list + when: kubernetes_role == 'master' - debug: msg: "{{ pod_list.stdout_lines }}" + when: kubernetes_role == 'master' - name: 2. Copy psql file in postgres kubernetes.core.k8s_cp: @@ -24,11 +26,12 @@ with_items: "{{ pg_version }}" when: kubernetes_role == 'master' -- ansible.builtin.debug: +- debug: msg: | ______ _ _ _ _____ ___ ___ _____ ___ | ___ \| | | | | | / __ \| \/ || _ | / _ \ | |_/ /| | ___ __ _ ___ ___ _ __ ___ ___ | |_ __ _ _ __ | |_ | / \/| . . || | | |/ /_\ \ | __/ | | / _ \ / _` |/ __| / _ \ | '__| / _ \/ __|| __| / _` || '__|| __| | | | |\/| || | | || _ | | | | || __/| (_| |\__ \| __/ | | | __/\__ \| |_ | (_| || | | |_ | \__/\| | | |\ \_/ /| | | | - \_| |_| \___| \__,_||___/ \___| |_| \___||___/ \__| \__,_||_| \__| \____/\_| |_/ \___/ \_| |_/ \ No newline at end of file + \_| |_| \___| \__,_||___/ \___| |_| \___||___/ \__| \__,_||_| \__| \____/\_| |_/ \___/ \_| |_/ + when: kubernetes_role == 'master'