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

Open
#8,968 1 comment 0 reactions 2 assignees View on GitHub

Maintainers usually reply within 1 day

@ntrogh is already working on this.

Since Oct 10, 2025.

Assessment

This issue has not been assessed yet.

Description

bug doc-enhancement

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)

Dominant language
Markdown
Stars
6.7k
Forks
5.8k
Avg merge
1d 7h
Merged PRs (30d)
138

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-docs

All issues in microsoft/vscode-docs

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.