Skip to content

Instantly share code, notes, and snippets.

@HauptJ
Created November 13, 2025 04:02
Show Gist options
  • Select an option

  • Save HauptJ/115957390c3eb2db2b6fa5356518bdf2 to your computer and use it in GitHub Desktop.

Select an option

Save HauptJ/115957390c3eb2db2b6fa5356518bdf2 to your computer and use it in GitHub Desktop.
Ansible Script to Install VSCode on RHEL Systems with DNF
#!/usr/bin/env ansible-playbook
---
- name: Install Text Editors
hosts: localhost
become: true
gather_facts: False
tasks:
- name: Add VSC repo
yum_repository:
name: code
description: Visual Studio Code
baseurl: https://packages.microsoft.com/yumrepos/vscode/
gpgkey: https://packages.microsoft.com/keys/microsoft.asc
gpgcheck: yes
enabled: yes
state: present
- name: Install VScode
dnf:
name:
- code
state: latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment