Fix ulauncher role on Ubuntu derived distros

This commit is contained in:
Kenneth Benzie 2024-07-06 13:04:10 +01:00
parent 18bf23864c
commit cbe9b40023
2 changed files with 22 additions and 1 deletions

View File

@ -12,3 +12,4 @@
- role: gnome-shell - role: gnome-shell
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP" when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"
- role: xremap - role: xremap
when: "'GNOME' in ansible_env.XDG_CURRENT_DESKTOP"

View File

@ -9,6 +9,25 @@
force: true force: true
environment: '{{proxy_environment}}' environment: '{{proxy_environment}}'
- name: slurp /etc/os-release
when: ansible_distribution != 'Debian'
slurp:
src: /etc/os-release
register: os_release_slurp
- when: ansible_distribution != 'Debian'
set_fact:
os_release: "{{ os_release_slurp.content |
b64decode | trim() | replace('=', ': ') | from_yaml }}"
- set_fact:
codename: '{{ansible_distribution_release}}'
- when: ansible_distribution != 'Debian' and 'UBUNTU_CODENAME' in os_release
set_fact:
codename: '{{os_release.UBUNTU_CODENAME}}'
- debug: var=codename
- name: add apt sources list - name: add apt sources list
when: ansible_distribution == 'Debian' when: ansible_distribution == 'Debian'
become: true become: true
@ -16,7 +35,7 @@
content: >- content: >-
deb [signed-by={{ulauncher_keyring_path}}] deb [signed-by={{ulauncher_keyring_path}}]
http://ppa.launchpad.net/agornostal/ulauncher/ubuntu http://ppa.launchpad.net/agornostal/ulauncher/ubuntu
{{ansible_distribution_release}} main" {{codename}} main"
dest: '{{ulauncher_apt_sources_list_path}}' dest: '{{ulauncher_apt_sources_list_path}}'
- name: add ppa repository - name: add ppa repository
@ -24,6 +43,7 @@
become: true become: true
apt_repository: apt_repository:
repo: ppa:agornostal/ulauncher repo: ppa:agornostal/ulauncher
codename: '{{codename}}'
- name: install apt package - name: install apt package
become: true become: true