diff --git a/molecule/default/requirements.yml b/molecule/default/requirements.yml index 03bb97b..0a4a9fb 100644 --- a/molecule/default/requirements.yml +++ b/molecule/default/requirements.yml @@ -3,4 +3,3 @@ roles: - name: ednxzu.manage_repositories - name: ednxzu.manage_apt_packages - - name: ednxzu.manage_pip_packages diff --git a/molecule/with_custom_config/requirements.yml b/molecule/with_custom_config/requirements.yml index 03bb97b..0a4a9fb 100644 --- a/molecule/with_custom_config/requirements.yml +++ b/molecule/with_custom_config/requirements.yml @@ -3,4 +3,3 @@ roles: - name: ednxzu.manage_repositories - name: ednxzu.manage_apt_packages - - name: ednxzu.manage_pip_packages diff --git a/molecule/with_custom_config/verify.yml b/molecule/with_custom_config/verify.yml index 9c36bbe..5dd3827 100644 --- a/molecule/with_custom_config/verify.yml +++ b/molecule/with_custom_config/verify.yml @@ -109,18 +109,12 @@ - name: "Test: python package docker" block: - - name: "Command pip3 list -o" - ansible.builtin.command: "pip3 list -o" + - name: "Command pip3 list" + ansible.builtin.command: "pip3 list" 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' in pip3_list_uptodate.stdout" + - "'docker' in pip3_list.stdout" diff --git a/tasks/install_docker_pip.yml b/tasks/install_docker_pip.yml deleted file mode 100644 index fcb4cd4..0000000 --- a/tasks/install_docker_pip.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# task/install_docker_pip file for install_docker -- name: "Install docker python packages" - ansible.builtin.include_role: - name: ednxzu.manage_pip_packages - vars: - manage_pip_packages_install_prereqs: false - manage_pip_packages_list: "{{ install_docker_pip_packages }}" diff --git a/tasks/install_python_docker.yml b/tasks/install_python_docker.yml new file mode 100644 index 0000000..afa2fe0 --- /dev/null +++ b/tasks/install_python_docker.yml @@ -0,0 +1,7 @@ +--- +# task/install_docker_pip file for install_docker +- name: "Install docker packages" + ansible.builtin.include_role: + name: ednxzu.manage_apt_packages + vars: + manage_apt_packages_list: "{{ install_docker_python_packages }}" diff --git a/tasks/main.yml b/tasks/main.yml index 58f0efc..1d56991 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,8 +10,8 @@ ansible.builtin.include_tasks: install_compose.yml when: install_docker_compose -- name: "Import install_docker_pip.yml" - ansible.builtin.include_tasks: install_docker_pip.yml +- name: "Import install_python_docker.yml" + ansible.builtin.include_tasks: install_python_docker.yml when: install_docker_python_packages - name: "Import configure.yml" diff --git a/vars/main.yml b/vars/main.yml index 59d6986..36e3366 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,9 +18,9 @@ install_docker_packages: - name: "containerd.io" version: latest state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}" -install_docker_pip_packages: - - name: docker - version_constraint: latest +install_docker_python_packages: + - name: python3-docker + version: latest state: "{% if install_docker_auto_update %}latest{% else %}present{% endif %}" install_docker_repository: - uri: "https://download.docker.com/linux/{{ ansible_distribution|lower }}"