diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index eb17672..39c7b4e 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -1,12 +1,22 @@ --- - name: Prepare playbook hosts: all - become: false gather_facts: false tasks: - - name: Install goodies (python3 & pip & gpg) for Debian OS-Family distros - ansible.builtin.raw: grep -q "debian" /etc/*-release && apt update && apt install -y python3 python3-pip gpg + - name: Install goodies (python3 & pip) for Debian OS-Family distros + ansible.builtin.raw: grep -q "debian" /etc/*-release && apt-get update && apt-get install -y python3 python3-pip args: executable: /bin/bash - ignore_errors: true + register: result + failed_when: + - result.rc != 0 + - result.stderr != "" + changed_when: result.rc == 0 + + - name: Install sudo & gpg + ansible.builtin.package: + name: + - sudo + - gpg + state: present diff --git a/tasks/main.yml b/tasks/main.yml index 9c7b33b..ae87d3e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,7 @@ - name: RedHat OS family installation when: ansible_os_family == 'RedHat' - #become: true + become: true block: - name: Import VSCodium gpg key to rpm db @@ -29,7 +29,7 @@ - name: Debian OS family installation when: ansible_os_family == 'Debian' - #become: true + become: true block: - name: Import VSCodium gpg key to keyring