diff --git a/roles/llvm/tasks/Debian.yaml b/roles/llvm/tasks/Debian.yaml index c93e6aa..9e3f9dc 100644 --- a/roles/llvm/tasks/Debian.yaml +++ b/roles/llvm/tasks/Debian.yaml @@ -1,5 +1,17 @@ --- +- name: slurp /etc/os-release + slurp: + src: /etc/os-release + register: os_release_slurp +- set_fact: + os_release: "{{ os_release_slurp.content | + b64decode | trim() | replace('=', ': ') | from_yaml }}" + +- include_tasks: Ubuntu.yaml + when: "'ID_LIKE' in os_release and os_release.ID_LIKE == 'ubuntu debian'" + - name: install apt packages + when: "'ID_LIKE' not in os_release" become: true apt: name: diff --git a/roles/llvm/tasks/Linux Mint.yaml b/roles/llvm/tasks/Linux Mint.yaml deleted file mode 100644 index 53957fa..0000000 --- a/roles/llvm/tasks/Linux Mint.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include_tasks: Ubuntu.yaml diff --git a/roles/llvm/tasks/Pop!_OS.yaml b/roles/llvm/tasks/Pop!_OS.yaml deleted file mode 100644 index 53957fa..0000000 --- a/roles/llvm/tasks/Pop!_OS.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include_tasks: Ubuntu.yaml diff --git a/roles/llvm/tasks/main.yaml b/roles/llvm/tasks/main.yaml index b5ebbe1..6853678 100644 --- a/roles/llvm/tasks/main.yaml +++ b/roles/llvm/tasks/main.yaml @@ -1,5 +1,2 @@ --- - include_tasks: '{{ansible_os_family}}.yaml' - when: ansible_os_family in ['Darwin', 'Windows'] -- include_tasks: '{{ansible_distribution}}.yaml' - when: ansible_os_family not in ['Darwin', 'Windows'] diff --git a/roles/neovim/tasks/Debian.yaml b/roles/neovim/tasks/Debian.yaml index b642ef6..fec63dc 100644 --- a/roles/neovim/tasks/Debian.yaml +++ b/roles/neovim/tasks/Debian.yaml @@ -1,7 +1,14 @@ --- +- name: slurp /etc/os-release + slurp: + src: /etc/os-release + register: os_release_slurp +- set_fact: + os_release: "{{ os_release_slurp.content | + b64decode | trim() | replace('=', ': ') | from_yaml }}" + - name: add neovim stable ppa - when: ansible_distribution == 'Ubuntu' and - ansible_distribution_version == '20.04' + when: "'ID_LIKE' in os_release and os_release.ID_LIKE == 'ubuntu debian'" become: true apt_repository: repo: ppa:neovim-ppa/stable