How can I use ansible to detect the specific flavor of Linux, e.g. "Lubuntu" -- a variant of Ubuntu?
On a Lubuntu 22.04, I tried to track ansible_distribution
with the following playbook:
---
- hosts: all
gather_facts: yes
become: false
tasks:
- name: Distribution
debug: msg="{{ ansible_distribution }}"
- name: Distribution version
debug: msg="{{ ansible_distribution_version}}"
- name: Distribution major version
debug: msg="{{ ansible_distribution_major_version }}"
But I got Ubuntu
as the ansible_distribution
, which isn't specific enough (for the task I have):
TASK [Distribution] ************************************************************
ok: [127.0.0.1] => {
"msg": "Ubuntu"
}
...
In general, how can one get the name of the specific Linux flavor such as Lubuntu?
-- Additional Info --
On the Lubuntu, I have:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
/etc/lsb-release
?