Files
ansible-collection-kolla/roles/docker_sdk/tasks/uninstall.yml
Michal Nasiadka 55d3c245c9 ansible-lint: Fix fqcn[action/action-core]
Change-Id: Idfbcfa8e9fc157c691ea30ebc5b6235ac4c3b436
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-11-21 14:17:13 +00:00

16 lines
919 B
YAML

---
- name: Uninstall docker SDK for python using pip
ansible.builtin.pip:
name: "{{ docker_sdk_core_pip_packages }}"
executable: "{{ (virtualenv is none) | ternary(ansible_facts.python.executable | regex_replace('python(\\d+(\\.\\d+)?)$', 'pip\\1'), omit) }}"
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
virtualenv_command: "{{ virtualenv is none | ternary(omit, ansible_facts.python.executable ~ ' -m venv') }}"
state: absent
become: true
become_user: "{{ virtualenv is none | ternary(omit, docker_sdk_virtualenv_owner) }}"
when: not (docker_sdk_python_externally_managed | default(false) and virtualenv is none)
# NOTE(r-krcek): Don't uninstall docker_sdk_packages because that includes
# important packages like pip or setuptools that are still needed on systems!