[EVO] S'assurer que les paquets pipx sont dans le path #2

Merged
pulsar merged 1 commits from ensurePath into master 2024-06-12 23:33:14 +00:00
3 changed files with 31 additions and 5 deletions

View File

@ -4,9 +4,9 @@
elbisna_prerequisites:
- pipx
elbisna_pip_packages:
- ansible
elbisna_inject_packages:
- netaddr
- dnspython
elbisna_vault_passwd: ""

6
handlers/main.yml Normal file
View File

@ -0,0 +1,6 @@
---
# handlers file for ansible
- name: Redémarrer le système
ansible.builtin.reboot:
become: true

View File

@ -9,9 +9,29 @@
- name: Installer ansible
community.general.pipx:
name: "{{ item }}"
name: ansible
state: latest
install_deps: true
become: true
become_user: "{{ elbisna_user }}"
loop: "{{ elbisna_pip_packages }}"
environment:
PIPX_HOME: /opt/pipx
PIPX_BIN_DIR: /usr/local/bin
- name: Injecter des paquets
community.general.pipx:
name: ansible
inject_packages: "{{ elbisna_inject_packages }}"
state: inject
become: true
environment:
PIPX_HOME: /opt/pipx
PIPX_BIN_DIR: /usr/local/bin
- name: Mettre à jour l'environnement
community.general.pipx:
name: ansible
state: upgrade_all
become: true
environment:
PIPX_HOME: /opt/pipx
PIPX_BIN_DIR: /usr/local/bin