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

This commit is contained in:
pulsar89.5 2023-10-12 16:46:03 +02:00 committed by pulsar89.5
parent 4c9b9c2054
commit 1cca41ec27
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