Use /etc/os-release to ID Ubuntu/Debian

Ansible facts aren't always enough to determine if a distro is derived
from Ubuntu or not, this is available from `/etc/os-release` when it
contains `ID_LIKE="ubuntu debian"`. This patch uses `/etc/os-release` to
correctly handle Ubuntu installations, e.g. PPA's, for all Ubuntu
derived dirtros rather than just Ubuntu itself.
This commit is contained in:
2023-08-01 19:14:32 +01:00
parent 58cd98c817
commit df00529f86
5 changed files with 21 additions and 9 deletions

View File

@@ -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']