Skip to content

Commit 8f6dada

Browse files
committed
fix: make updating Python tools idempotent
1 parent 4c0344e commit 8f6dada

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tasks/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
- name: Include tasks
2222
ansible.builtin.include_tasks: '{{ ansible_os_family | lower }}/main.yml'
2323

24-
- name: Install python | Upgrade tools # noqa no-changed-when
24+
- name: Install python | Upgrade tools
2525
ansible.builtin.command: >
2626
/opt/python/{{ item }}/bin/pip install --upgrade \
2727
pip setuptools wheel
2828
loop: "{{ python_versions }}"
29+
register: command_result
30+
changed_when: "'Successfully installed' in command_result.stdout"
2931
tags:
3032
- python-install-upgrade-tools

0 commit comments

Comments
 (0)