From 7911ebd57795d599bb7f692537d44009a7e79b23 Mon Sep 17 00:00:00 2001 From: Alexandre Le Gall Date: Thu, 5 Oct 2023 10:35:22 +0200 Subject: [PATCH] [EVO] Utiliser pipx --- defaults/main.yml | 2 +- tasks/installation.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 587f6df..62a0349 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,7 +2,7 @@ # defaults file for ansible elbisna_prerequisites: - - python3-pip + - pipx elbisna_pip_packages: - ansible diff --git a/tasks/installation.yml b/tasks/installation.yml index 053877a..d823c6f 100644 --- a/tasks/installation.yml +++ b/tasks/installation.yml @@ -8,6 +8,10 @@ become: true - name: Installer ansible - ansible.builtin.pip: - name: "{{ elbisna_pip_packages }}" + community.general.pipx: + name: "{{ item }}" + state: latest + install_deps: true become: true + become_user: "{{ elbisna_user }}" + loop: "{{ elbisna_pip_packages }}"