--- - name: install keyring when: ansible_distribution == 'Debian' become: true get_url: url: '{{ulauncher_keyring_url}}' dest: '{{ulauncher_keyring_path}}' mode: '0644' force: true 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 when: ansible_distribution == 'Debian' become: true copy: content: >- deb [signed-by={{ulauncher_keyring_path}}] http://ppa.launchpad.net/agornostal/ulauncher/ubuntu {{codename}} main" dest: '{{ulauncher_apt_sources_list_path}}' - name: add ppa repository when: ansible_distribution != 'Debian' become: true apt_repository: repo: ppa:agornostal/ulauncher codename: '{{codename}}' - name: install apt package become: true apt: name: ulauncher state: latest - include_tasks: linux-autostart.yaml