From 29abb1dadf66dd4b270048ac961a57b195740570 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Tue, 29 Aug 2023 23:42:00 +0200 Subject: [PATCH] fix duplicate variable name --- molecule/default/verify.yml | 13 +++---------- tasks/install_python_docker.yml | 2 +- vars/main.yml | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index 1b2eb4a..f5f12c5 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -99,19 +99,12 @@ - name: "Test: python package docker" block: - - name: "Command pip3 list -o" + - name: "Command pip3 list" ansible.builtin.command: "pip3 list -o" changed_when: false - register: pip3_list_outdated - - - name: "Command pip3 list -u" - ansible.builtin.command: "pip3 list -u" - changed_when: false - register: pip3_list_uptodate - + register: pip3_list - name: "Verify python package docker" ansible.builtin.assert: that: - - "'docker' not in pip3_list_outdated.stdout" - - "'docker' not in pip3_list_uptodate.stdout" + - "'docker' not in pip3_list" diff --git a/tasks/install_python_docker.yml b/tasks/install_python_docker.yml index afa2fe0..35c69fa 100644 --- a/tasks/install_python_docker.yml +++ b/tasks/install_python_docker.yml @@ -4,4 +4,4 @@ ansible.builtin.include_role: name: ednxzu.manage_apt_packages vars: - manage_apt_packages_list: "{{ install_docker_python_packages }}" + manage_apt_packages_list: "{{ install_docker_python_packages_list }}" diff --git a/vars/main.yml b/vars/main.yml index 36e3366..63251a1 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,7 +18,7 @@ install_docker_packages: - name: "containerd.io" version: latest state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}" -install_docker_python_packages: +install_docker_python_packages_list: - name: python3-docker version: latest state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}"