egdoc.vscode
Ansible role: vscode
This Ansible role is designed to install Visual Studio Code on Linux.
Requirements
No specific requirements are needed for this role, but the gpg
tool must be installed on Debian-based systems to ensure the installation works. This tool is required for the package's post-install script.
To maintain idempotence (ensuring the role can be run multiple times without changing the result), this role downloads the GPG key into /etc/apt/keyrings/
without altering it on Debian-based systems. The key in this format can only be used by SecureApt version 1.4 or later (available since the Stretch version of Debian). More information can be found here.
Role Variables
vscode_gpg_key_url
: This is the URL for the Visual Studio Code GPG key: https://packages.microsoft.com/keys/microsoft.ascvscode_gpg_key_fingerprint
: This is the fingerprint of the GPG key: BC528686B50D79E339D3721CEB3E94ADBE1229CF
These variables represent the URL and fingerprint for the Visual Studio Code GPG key.
vscode_rpm_repository_url
: This is the URL for the Visual Studio Code RPM repository: https://packages.microsoft.com/yumrepos/vscodevscode_apt_repository_url
: This is the URL for the Visual Studio Code APT repository: deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.asc] https://packages.microsoft.com/repos/code stable main
These variables contain the repositories' URLs for both APT and RPM.
Dependencies
None
Example Playbook
- hosts: all
roles:
- role: egdoc.vscode
License
This role is licensed under GPL-2.0.
Author Information
This role was created by Egidio Docile.
Ansible role to install Visual Studio Code on Linux
ansible-galaxy install egdoc.vscode