Created
September 2, 2021 00:47
-
-
Save carreirorco/d58b0ef842a250be5c2e389a60ca48ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
tasks: | |
- name: Import a key from a url | |
become: yes | |
ansible.builtin.rpm_key: | |
state: present | |
key: https://packages.microsoft.com/keys/microsoft.asc | |
- name: Create the repository file | |
become: yes | |
copy: | |
dest: /etc/yum.repos.d/vscode.repo | |
content: | | |
[code] | |
name=Visual Studio Code | |
baseurl=https://packages.microsoft.com/yumrepos/vscode | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://packages.microsoft.com/keys/microsoft.asc | |
- name: Install Visual Studio Code | |
become: yes | |
dnf: | |
name: code | |
state: present | |
update_cache: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment