From 25f9c51b69200fd8eb12ffcf5f74e5b4ed743cf7 Mon Sep 17 00:00:00 2001 From: Mike Pruett Date: Sun, 29 Sep 2024 00:27:33 -0500 Subject: [PATCH 1/4] Added step to add the Microsoft key to the Apt keyring... --- tasks/install-apt.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index 1af5efb..3736aa8 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -23,6 +23,12 @@ mode: 'u=rw,go=r' force: true +- name: Add key to keyring (apt) + become: true + ansible.builtin.apt_key: + file: '/etc/apt/keyrings/microsoft.asc' + state: present + - name: Install VS Code repo (apt) become: true ansible.builtin.apt_repository: From edd2c85118c3f0aae5fd825bb5545b1197d56a18 Mon Sep 17 00:00:00 2001 From: Mike Pruett Date: Sun, 29 Sep 2024 00:40:02 -0500 Subject: [PATCH 2/4] Revert "Added step to add the Microsoft key to the Apt keyring..." This reverts commit 25f9c51b69200fd8eb12ffcf5f74e5b4ed743cf7. --- tasks/install-apt.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index 3736aa8..1af5efb 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -23,12 +23,6 @@ mode: 'u=rw,go=r' force: true -- name: Add key to keyring (apt) - become: true - ansible.builtin.apt_key: - file: '/etc/apt/keyrings/microsoft.asc' - state: present - - name: Install VS Code repo (apt) become: true ansible.builtin.apt_repository: From 00182b3aa51324d7ea056f442ab0b76e1e1a4e36 Mon Sep 17 00:00:00 2001 From: Mike Pruett Date: Sun, 29 Sep 2024 00:43:04 -0500 Subject: [PATCH 3/4] Following the new way of adding keys to apt, as apt_key is deprecated --- tasks/install-apt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index 1af5efb..3a8492d 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -19,7 +19,7 @@ become: true ansible.builtin.get_url: url: '{{ visual_studio_code_mirror }}/keys/microsoft.asc' - dest: '/etc/apt/keyrings/' + dest: '/etc/apt/trusted.gpg.d/' mode: 'u=rw,go=r' force: true From 26366271f384826478006877f109696460a1eb6f Mon Sep 17 00:00:00 2001 From: Mike Pruett Date: Sun, 29 Sep 2024 00:48:47 -0500 Subject: [PATCH 4/4] Oops... forgot to update the apt_repository step! --- tasks/install-apt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/install-apt.yml b/tasks/install-apt.yml index 3a8492d..674203a 100644 --- a/tasks/install-apt.yml +++ b/tasks/install-apt.yml @@ -29,7 +29,7 @@ repo: >- deb [arch={{ visual_studio_code_deb_architecture }} {{ visual_studio_code_gpgcheck | ternary("", " trusted=true") }} - signed-by=/etc/apt/keyrings/microsoft.asc] + signed-by=/etc/apt/trusted.gpg.d/microsoft.asc] {{ visual_studio_code_mirror }}/repos/code stable main filename: vscode state: present