From 922a3854c85ff43f0e5310d37c757d6288e1eabe Mon Sep 17 00:00:00 2001 From: Alan Janis Date: Fri, 1 Nov 2024 10:18:31 +0000 Subject: [PATCH] add pkg lock check before pipx installations --- tasks/ssh-ldap-pubkey.yml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/tasks/ssh-ldap-pubkey.yml b/tasks/ssh-ldap-pubkey.yml index f7e32a3..fd1f15b 100644 --- a/tasks/ssh-ldap-pubkey.yml +++ b/tasks/ssh-ldap-pubkey.yml @@ -1,8 +1,26 @@ --- -- name: Install ssh-ldap-pubkey and wrapper script via pipx - community.general.pipx: - name: ssh-ldap-pubkey - state: latest - environment: - PIPX_HOME: /usr/local/share/pipx - PIPX_BIN_DIR: /usr/local/bin +- name: ssh-ldap-pubkey | Install pipx and ssh-ldap-pubkey package + block: + - name: Wait for locks + ansible.builtin.include_tasks: + file: wait_for_locks.yml + + - name: packages-pip | Install pipx + ansible.builtin.package: + name: pipx + state: present + environment: + PIPX_HOME: /usr/local/share/pipx + PIPX_BIN_DIR: /usr/local/bin + register: pipx_install + until: pipx_install is not failed + + - name: Install ssh-ldap-pubkey and wrapper script via pipx + community.general.pipx: + name: ssh-ldap-pubkey + state: latest + environment: + PIPX_HOME: /usr/local/share/pipx + PIPX_BIN_DIR: /usr/local/bin + register: ssh_ldap_pubkey_install + until: ssh_ldap_pubkey_install is not failed