From a5d99be690efa30bbc150de4b67fe57c4c3f9fc4 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Mon, 4 Sep 2023 06:50:20 +0100 Subject: [PATCH] Removed unneeded RPM dependencies (#248) Visual Studio Code packages now correctly reference all required dependencies. --- molecule/code-only/converge.yml | 21 ------------ molecule/default/converge.yml | 21 ------------ molecule/ubuntu-min-trusted-yes/converge.yml | 14 -------- molecule/ubuntu-min/converge.yml | 34 ++++++++------------ tasks/install-dnf.yml | 11 ------- tasks/install-yum.yml | 6 ---- tasks/install-zypper.yml | 11 ------- 7 files changed, 13 insertions(+), 105 deletions(-) diff --git a/molecule/code-only/converge.yml b/molecule/code-only/converge.yml index ac503c8..3abae17 100644 --- a/molecule/code-only/converge.yml +++ b/molecule/code-only/converge.yml @@ -22,27 +22,6 @@ changed_when: false when: ansible_pkg_mgr == 'apt' - - name: Install gnupg2 (apt) - become: true - ansible.builtin.apt: - name: gnupg2 - state: present - when: ansible_pkg_mgr == 'apt' - - - name: Install extension cli dependencies (zypper) - become: true - ansible.builtin.package: - name: libX11-xcb1 - state: present - when: ansible_pkg_mgr == 'zypper' - - - name: Install extension cli dependencies (apt) - become: true - ansible.builtin.apt: - name: libx11-xcb1 - state: present - when: ansible_pkg_mgr == 'apt' - roles: - role: ansible-role-visual-studio-code users: diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 0a50bdc..2485014 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -23,27 +23,6 @@ changed_when: false when: ansible_pkg_mgr == 'apt' - - name: Install gnupg2 (apt) - become: true - ansible.builtin.apt: - name: gnupg2 - state: present - when: ansible_pkg_mgr == 'apt' - - - name: Install extension cli dependencies (zypper) - become: true - ansible.builtin.package: - name: libX11-xcb1 - state: present - when: ansible_pkg_mgr == 'zypper' - - - name: Install extension cli dependencies (apt) - become: true - ansible.builtin.apt: - name: libx11-xcb1 - state: present - when: ansible_pkg_mgr == 'apt' - - name: Create settings directory become: true become_user: test_usr4 diff --git a/molecule/ubuntu-min-trusted-yes/converge.yml b/molecule/ubuntu-min-trusted-yes/converge.yml index 5f73d47..db34976 100644 --- a/molecule/ubuntu-min-trusted-yes/converge.yml +++ b/molecule/ubuntu-min-trusted-yes/converge.yml @@ -10,20 +10,6 @@ changed_when: false when: ansible_pkg_mgr == 'apt' - - name: Install gnupg2 (apt) - become: true - ansible.builtin.apt: - name: gnupg2 - state: present - when: ansible_pkg_mgr == 'apt' - - - name: Install extension cli dependencies (apt) - become: true - ansible.builtin.apt: - name: libx11-xcb1 - state: present - when: ansible_pkg_mgr == 'apt' - roles: - role: ansible-role-visual-studio-code visual_studio_code_gpgcheck: false diff --git a/molecule/ubuntu-min/converge.yml b/molecule/ubuntu-min/converge.yml index 021fae5..a50d5d9 100644 --- a/molecule/ubuntu-min/converge.yml +++ b/molecule/ubuntu-min/converge.yml @@ -23,38 +23,30 @@ changed_when: false when: ansible_pkg_mgr == 'apt' - - name: Install gnupg2 (apt) + - name: Create APT keyrings dir become: true - ansible.builtin.apt: - name: gnupg2 - state: present - when: ansible_pkg_mgr == 'apt' - - - name: Install extension cli dependencies (zypper) - become: true - ansible.builtin.package: - name: libX11-xcb1 - state: present - when: ansible_pkg_mgr == 'zypper' - - - name: Install extension cli dependencies (apt) - become: true - ansible.builtin.apt: - name: libx11-xcb1 - state: present + ansible.builtin.file: + path: '/etc/apt/keyrings' + state: directory + mode: 'u=rwx,go=rx' when: ansible_pkg_mgr == 'apt' - name: Install key (apt) become: true - ansible.builtin.apt_key: + ansible.builtin.get_url: url: '{{ visual_studio_code_mirror }}/keys/microsoft.asc' - state: present + dest: '/etc/apt/keyrings/' + mode: 'u=rw,go=r' + force: true when: ansible_pkg_mgr == 'apt' - name: Install VS Code repo (apt) become: true ansible.builtin.apt_repository: - repo: 'deb [arch=amd64] {{ visual_studio_code_mirror }}/repos/code stable main' + repo: >- + deb [arch={{ visual_studio_code_deb_architecture }} + signed-by=/etc/apt/keyrings/microsoft.asc] + {{ visual_studio_code_mirror }}/repos/code stable main filename: vscode state: present when: ansible_pkg_mgr == 'apt' diff --git a/tasks/install-dnf.yml b/tasks/install-dnf.yml index 7cba52f..f9cd39c 100644 --- a/tasks/install-dnf.yml +++ b/tasks/install-dnf.yml @@ -1,16 +1,5 @@ # code: language=ansible --- -- name: Install dependencies (dnf) - become: true - ansible.builtin.dnf: - name: - - libdrm - - libX11-xcb - - libxshmfence - - mesa-libgbm - - which - state: present - - name: Install VS Code repo (dnf) become: true ansible.builtin.yum_repository: diff --git a/tasks/install-yum.yml b/tasks/install-yum.yml index 7c646c4..3454f63 100644 --- a/tasks/install-yum.yml +++ b/tasks/install-yum.yml @@ -1,11 +1,5 @@ # code: language=ansible --- -- name: Install dependencies (yum) - become: true - ansible.builtin.yum: - name: which - state: present - - name: Install VS Code repo (yum) become: true ansible.builtin.yum_repository: diff --git a/tasks/install-zypper.yml b/tasks/install-zypper.yml index cd3b354..8dbdce2 100644 --- a/tasks/install-zypper.yml +++ b/tasks/install-zypper.yml @@ -1,16 +1,5 @@ # code: language=ansible --- -- name: Install dependencies (zypper) - become: true - ansible.builtin.package: - name: - - libdrm2 - - libgbm1 - - libxcb-dri3-0 - - libxshmfence1 - - which - state: present - - name: Install key (zypper) become: true ansible.builtin.rpm_key: