refactor: reorganize Ansible tasks for better structure and include common package installations
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s
This commit is contained in:
28
config/ansible/tasks/workstations/vscode.yml
Normal file
28
config/ansible/tasks/workstations/vscode.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
- name: Import Microsoft GPG key
|
||||
ansible.builtin.rpm_key:
|
||||
key: https://packages.microsoft.com/keys/microsoft.asc
|
||||
state: present
|
||||
|
||||
- name: Add VSCode repository
|
||||
ansible.builtin.copy:
|
||||
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
|
||||
dest: /etc/yum.repos.d/vscode.repo
|
||||
mode: '0644'
|
||||
|
||||
- name: Check if VSCode is installed
|
||||
ansible.builtin.command: code --version
|
||||
register: vscode_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Install VSCode
|
||||
ansible.builtin.package:
|
||||
name: code
|
||||
state: present
|
||||
when: vscode_check.rc != 0
|
Reference in New Issue
Block a user