- name: Add VS repository block: - name: VS repo - apt key ansible.builtin.get_url: url: https://packages.microsoft.com/keys/microsoft.asc dest: /etc/apt/trusted.gpg.d/microsoft_key.asc - name: VS repo - url ansible.builtin.apt_repository: repo: "deb https://packages.microsoft.com/repos/vscode stable main" state: present - name: Install VSCode ansible.builtin.apt: name: code state: latest