vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

ansible workaround for Microsoft's aggressive repo management (users to opt-out of apt repository install)

Open mcallaghan-geotab opened this issue 4 months ago • 1 comments

If you want to follow https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions , and are using ansible to manage your PPAs, keyrings, etc -- then you really don't appreciate what Microsoft is doing here. See https://github.com/microsoft/vscode/issues/22145 .

Here's a quick workaround for anyone stumbling over this that is managing code (vscode) installation on Linux using ansible; Should be portable to other toolchains as well.

- name: Disable automatic Microsoft repository configuration for vscode
  become: yes
  ansible.builtin.debconf:
    name: code
    question: code/add-microsoft-repo
    value: 'false'
    vtype: boolean

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debconf_module.html

(I created a NEW issue because all the prior ones related are LOCKED)

mcallaghan-geotab avatar Oct 10 '25 02:10 mcallaghan-geotab

Adding @ntrogh to see whether this could be added to the docs.

rzhao271 avatar Oct 10 '25 15:10 rzhao271