Use Discord canary deb instead of Flatpak
This commit is contained in:
parent
8a0df461bb
commit
e6fa30e155
5 changed files with 66 additions and 7 deletions
36
roles/discord-canary/tasks/main.yml
Normal file
36
roles/discord-canary/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
- name: Install pkexec
|
||||
become: yes
|
||||
apt:
|
||||
state: latest
|
||||
install_recommends: false
|
||||
name: pkexec
|
||||
|
||||
- name: Copy update helper
|
||||
copy:
|
||||
src: "{{ role_path }}/files/update-discord"
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/"
|
||||
|
||||
- name: Make update helper executable
|
||||
ansible.builtin.file:
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/update-discord"
|
||||
mode: "ug+x"
|
||||
|
||||
- name: Download Discord canary using helper
|
||||
ansible.builtin.command:
|
||||
cmd: "update-discord --download-only"
|
||||
chdir: "{{ ansible_env.HOME }}/.local/bin"
|
||||
register: helper_result
|
||||
failed_when: ( helper_result.rc not in [ 0, 2 ] )
|
||||
|
||||
- name: Install Discord canary
|
||||
become: yes
|
||||
apt:
|
||||
deb: /tmp/discord-canary.deb
|
||||
install_recommends: false
|
||||
when: helper_result.rc != 2
|
||||
|
||||
- name: Remove installation package
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: /tmp/discord-canary.deb
|
||||
when: helper_result.rc != 2
|
Loading…
Add table
Add a link
Reference in a new issue