Skip to content

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

Open

Description

@mcallaghan-geotab

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 microsoft/vscode#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)

Activity

  1. rzhao271 commented on Oct 10, 2025

    @rzhao271
    Contributor

    Adding Nick Trogh (@ntrogh) to see whether this could be added to the docs.

  2. added
    docs-experience
    on Oct 10, 2025
  3. added
    doc-enhancement
    and removed
    docs-experience
    on Oct 14, 2025
  4. added
    bug
    on Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdoc-enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions