Matej Focko
14576e842e
When installing VSCode via RPM or DEB package, branch by the package manager rather than the distribution. Signed-off-by: Matej Focko <me@mfocko.xyz>
21 lines
599 B
YAML
21 lines
599 B
YAML
---
|
|
- 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
|
|
|
|
- name: Install VSCode via dnf
|
|
ansible.builtin.dnf:
|
|
name: "{{ _vscode_rpm_response.url }}"
|
|
disable_gpg_check: true
|
|
state: present
|
|
become: true
|
|
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"
|