summaryrefslogtreecommitdiffstats
path: root/roles/python/tasks
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-11-03 22:58:57 +0100
committerAhmed AbdelHalim <[email protected]>2025-11-03 22:58:57 +0100
commitd5c97427499862c168414996763f7fc55438eb54 (patch)
tree08d08a1fd6fcf8ce1e5b78e7092ca755cf7bfc3f /roles/python/tasks
parent5b5d592e12aae9a9ffa40557db78288d39b974d3 (diff)
Fix python install not to always report changed
Diffstat (limited to 'roles/python/tasks')
-rw-r--r--roles/python/tasks/main.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/python/tasks/main.yml b/roles/python/tasks/main.yml
index ddecbbbb..f8db4318 100644
--- a/roles/python/tasks/main.yml
+++ b/roles/python/tasks/main.yml
@@ -36,7 +36,7 @@
- name: "Install python versions"
ansible.builtin.command:
cmd: "uv python install {{ item }}"
- args:
- creates: "{{ ansible_env.HOME }}/.local/share/uv/python/cpython-{{ item }}*/bin/python{{ item }}"
+ register: python_install_result
+ changed_when: "'already installed' not in python_install_result.stderr"
loop: "{{ python_versions }}"
when: python_versions | length > 0