Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible not reporting distribution info on Ubuntu 20.04?

Example on Ubuntu 18.04 reporting distribution info in 'ansible_facts':

$ ansible -i hosts ubuntu1804 -u root -m setup -a "filter=ansible_distribution*"
ubuntu1804 | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "Ubuntu", 
        "ansible_distribution_file_parsed": true, 
        "ansible_distribution_file_path": "/etc/os-release", 
        "ansible_distribution_file_variety": "Debian", 
        "ansible_distribution_major_version": "18", 
        "ansible_distribution_release": "bionic", 
        "ansible_distribution_version": "18.04"
    }, 
    "changed": false
}

Example of same command against Ubuntu 20.04:

$ ansible -i hosts ubuntu2004 -u root -m setup -a "filter=ansible_distribution*"
ubuntu2004 | SUCCESS => {
    "ansible_facts": {}, 
    "changed": false
}

Is this an issue with Ubuntu or Ansible? Is there a workaround?

like image 694
JonB Avatar asked Apr 27 '20 13:04

JonB


1 Answers

Issue resolved with today's update to ansible 2.9.7.

like image 70
JonB Avatar answered Oct 20 '22 12:10

JonB