-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Maybe I'm using this wrong, but on Linux when I re-run a playbook using this role, after a previous success, it fails:
TASK [ansible_pyenv : Install Python interpreters] *****************************************
failed: [localhost] (item=3.10.3) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/dephekt//.pyenv/bin/pyenv install 3.10.3", "delta": "0:00:00.024369", "end": "2022-10-21 02:15:19.618294", "item": "3.10.3", "msg": "non-zero return code", "rc": 1, "start": "2022-10-21 02:15:19.593925", "stderr": "pyenv: /root/.pyenv/versions/3.10.3 already exists", "stderr_lines": ["pyenv: /root/.pyenv/versions/3.10.3 already exists"], "stdout": "", "stdout_lines": []}
It looks like there are no checks that an interpreter already exists prior to attempting to do a pyenv install for it.
I expected that it would be relatively idempotent and if versions were already installed it would not attempt to install them again (or at least not error out if it did), but I don't see any attempt at checking them after looking through the code. However, I see there are idempotence tests, so I'm really confused how this is happening.
I'm using Ansible 6.4.0-1ppa~jammy
on Ubuntu 22.04. This commit sums up what my ansible-pyenv configuration looks like in my playbook.
Metadata
Metadata
Assignees
Labels
No labels