fix(editor_vscode): branch by package manager
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>
This commit is contained in:
parent
314ce8700c
commit
14576e842e
12 changed files with 14 additions and 8 deletions
|
@ -1 +0,0 @@
|
||||||
install_rhel.yml
|
|
|
@ -1 +0,0 @@
|
||||||
install_rhel.yml
|
|
|
@ -1 +0,0 @@
|
||||||
install_deb.yml
|
|
|
@ -1 +0,0 @@
|
||||||
install_rhel.yml
|
|
|
@ -1 +0,0 @@
|
||||||
install_rhel.yml
|
|
|
@ -1 +0,0 @@
|
||||||
install_deb.yml
|
|
1
roles/editor_vscode/tasks/install_dnf.yml
Symbolic link
1
roles/editor_vscode/tasks/install_dnf.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
install_rpm.yml
|
1
roles/editor_vscode/tasks/install_dnf5.yml
Symbolic link
1
roles/editor_vscode/tasks/install_dnf5.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
install_rpm.yml
|
|
@ -4,9 +4,18 @@
|
||||||
url: https://code.visualstudio.com/sha/download?build=insider&os=linux-rpm-x64
|
url: https://code.visualstudio.com/sha/download?build=insider&os=linux-rpm-x64
|
||||||
register: _vscode_rpm_response
|
register: _vscode_rpm_response
|
||||||
|
|
||||||
- name: Install VSCode via RPM
|
- name: Install VSCode via dnf
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
name: "{{ _vscode_rpm_response.url }}"
|
name: "{{ _vscode_rpm_response.url }}"
|
||||||
disable_gpg_check: true
|
disable_gpg_check: true
|
||||||
state: present
|
state: present
|
||||||
become: true
|
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"
|
1
roles/editor_vscode/tasks/install_zypper.yml
Symbolic link
1
roles/editor_vscode/tasks/install_zypper.yml
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
install_rpm.yml
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Install VSCode
|
- name: Install VSCode
|
||||||
ansible.builtin.include_tasks: "install_{{ ansible_distribution }}.yml"
|
ansible.builtin.include_tasks: "install_{{ ansible_facts.pkg_mgr }}.yml"
|
||||||
tags: install
|
tags: install
|
||||||
|
|
||||||
- name: Create directories for VSCode
|
- name: Create directories for VSCode
|
||||||
|
|
Loading…
Reference in a new issue