2024-12-22 20:29:09 +01:00
|
|
|
---
|
|
|
|
- name: Resolve URL to the VSCode RPM
|
|
|
|
ansible.builtin.uri:
|
|
|
|
url: https://code.visualstudio.com/sha/download?build=insider&os=linux-rpm-x64
|
|
|
|
register: _vscode_rpm_response
|
|
|
|
|
2024-12-29 17:48:16 +01:00
|
|
|
- name: Install VSCode via dnf
|
2024-12-22 20:29:09 +01:00
|
|
|
ansible.builtin.dnf:
|
|
|
|
name: "{{ _vscode_rpm_response.url }}"
|
|
|
|
disable_gpg_check: true
|
|
|
|
state: present
|
|
|
|
become: true
|
2024-12-29 17:48:16 +01:00
|
|
|
when: ansible_facts.pkg_mgr.startswith("dnf")
|
|
|
|
|
|
|
|
- name: Install VSCode via zypper
|
|
|
|
community.general.zypper:
|
|
|
|
name: "{{ _vscode_rpm_response.url }}"
|
|
|
|
disable_gpg_check: true
|
|
|
|
state: present
|
|
|
|
become: true
|
|
|
|
when: ansible_facts.pkg_mgr == "zypper"
|