From 16d2f5f01e17f649c055d35586069c7dc7262d75 Mon Sep 17 00:00:00 2001 From: Vitaliy Kukharik Date: Fri, 13 Dec 2024 22:38:23 +0500 Subject: [PATCH] check_mode for WAL-G --- automation/roles/wal-g/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/automation/roles/wal-g/tasks/main.yml b/automation/roles/wal-g/tasks/main.yml index 0799094a9..803669bce 100644 --- a/automation/roles/wal-g/tasks/main.yml +++ b/automation/roles/wal-g/tasks/main.yml @@ -40,6 +40,7 @@ dest: /tmp/ timeout: 60 validate_certs: false + check_mode: false vars: wal_g_repo: "https://github.com/wal-g/wal-g/releases/download/v{{ wal_g_version | string | replace('v', '') }}" wal_g_archive: "wal-g-pg-ubuntu-20.04-amd64.tar.gz" @@ -55,6 +56,7 @@ extra_opts: - --no-same-owner remote_src: true + check_mode: false - name: Copy WAL-G binary file to "{{ wal_g_path.split(' ')[0] }}" ansible.builtin.copy: @@ -191,6 +193,7 @@ - (wal_g_installation_method == "src" or (ansible_os_family == "RedHat" and ansible_distribution_major_version == '8')) - wal_g_version is version('1.0', '>=') - (wal_g_installed_version.stderr is search("command not found") or wal_g_installed_version.stdout != wal_g_version) + - not ansible_check_mode tags: wal-g, wal_g, wal_g_install # older versions of WAL-G (for compatibility) @@ -202,6 +205,7 @@ timeout: 60 validate_certs: false environment: "{{ proxy_env | default({}) }}" + check_mode: false - name: Extract WAL-G into /tmp ansible.builtin.unarchive: @@ -210,6 +214,7 @@ extra_opts: - --no-same-owner remote_src: true + check_mode: false - name: Copy WAL-G binary file to "{{ wal_g_path.split(' ')[0] }}" ansible.builtin.copy: @@ -241,6 +246,7 @@ dest: "{{ wal_g_path.split(' ')[0] }}" mode: u+x,g+x,o+x remote_src: true + check_mode: false when: - installation_method == "file" - wal_g_version is version('1.0', '>=') @@ -264,6 +270,7 @@ dest: "{{ wal_g_path.split(' ')[0] }}" mode: u+x,g+x,o+x remote_src: true + check_mode: false when: - installation_method == "file" - wal_g_version is version('0.2.19', '<=')