diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-10-20 00:06:49 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-10-20 00:48:59 +0200 |
| commit | 806deb655dc2cce32ceffde65ebb7abe88937da1 (patch) | |
| tree | f7fc2ca0796f18d5f95fb3346feb7a931c8331e9 /roles/ansible | |
| parent | cf400c3e738f9660cc76e9fad82c4654acca2583 (diff) | |
Refactor python role to remove homebrew dependency
Diffstat (limited to 'roles/ansible')
| -rw-r--r-- | roles/ansible/README.md | 26 | ||||
| -rw-r--r-- | roles/ansible/tasks/main.yml | 8 |
2 files changed, 3 insertions, 31 deletions
diff --git a/roles/ansible/README.md b/roles/ansible/README.md index 8e6f3a6e..1234be86 100644 --- a/roles/ansible/README.md +++ b/roles/ansible/README.md @@ -60,32 +60,12 @@ To switch the default version: The symlinks will be updated to point to the new default versions. -## Manual Cleanup - -This role does not automatically remove unused versions. To manually clean up old installations: - -### List installed versions - -```bash -pipx list --short -``` - -### Remove specific versions - -```bash -# Remove ansible-core versions -pipx uninstall ansible-core2.18.0 - -# Remove molecule versions -pipx uninstall molecule25.7.0 -``` - ## Requirements -- pipx must be installed and available at `/home/linuxbrew/.linuxbrew/bin/pipx` -- The `community.general` Ansible collection for the pipx module +- `uv` +- `python` -These requirements are satisfied with the `homebrew` and `python` roles (added as dependencies) +These are installed via `python` role ## Example Playbook diff --git a/roles/ansible/tasks/main.yml b/roles/ansible/tasks/main.yml index fa1de1b7..335dba72 100644 --- a/roles/ansible/tasks/main.yml +++ b/roles/ansible/tasks/main.yml @@ -12,8 +12,6 @@ uv tool list | grep "^ansible-core " | awk '{print $2}' | sed 's/^v//' args: executable: /bin/bash - environment: - PATH: "/home/linuxbrew/.linuxbrew/bin:{{ ansible_env.PATH }}" register: ansible_core_installed_version changed_when: false failed_when: false @@ -24,8 +22,6 @@ uv tool install ansible-core=={{ ansible_core_version }} --force args: executable: /bin/bash - environment: - PATH: "/home/linuxbrew/.linuxbrew/bin:{{ ansible_env.PATH }}" changed_when: true when: ansible_core_installed_version.stdout != ansible_core_version @@ -35,8 +31,6 @@ uv tool list | grep "^molecule " | awk '{print $2}' | sed 's/^v//' args: executable: /bin/bash - environment: - PATH: "/home/linuxbrew/.linuxbrew/bin:{{ ansible_env.PATH }}" register: molecule_installed_version changed_when: false failed_when: false @@ -47,7 +41,5 @@ uv tool install molecule=={{ molecule_version }} --with 'molecule-plugins[docker,podman]' --force args: executable: /bin/bash - environment: - PATH: "/home/linuxbrew/.linuxbrew/bin:{{ ansible_env.PATH }}" changed_when: true when: molecule_installed_version.stdout != molecule_version |
