# unable to detect ubuntu flavour ?

**URL:** <https://forum.ansible.com/t/unable-to-detect-ubuntu-flavour/22699>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [October 1, 2016, 5:10pm UTC](https://forum.ansible.com/t/unable-to-detect-ubuntu-flavour/22699 "2016-10-01T17:10:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_C1](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@Mike\_C1](https://forum.ansible.com/u/Mike_C1)\
**Post date:** [October 1, 2016, 5:10pm UTC](https://forum.ansible.com/t/unable-to-detect-ubuntu-flavour/22699/1 "2016-10-01T17:10:19Z")

</div>

when gathering facts from a server, ubuntu release version comes back as NA.  
Has anyone experienced this ?

```auto

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

```

but ansible reports ubuntu release as NA

```auto

ansible all -l server -m setup -a 'filter=ansible_distribution_release'
server | SUCCESS => {
"ansible_facts": {
"ansible_distribution_release": "NA"
},
"changed": false
}

```

Ansible version:

```auto

ansible 2.1.1.0
config file = /Users/mchristof/di/ansible/ansible.cfg
configured module search path = Default w/o overrides

```

python version on the server

```auto
Python 2.7.11

```

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 3, 2016, 9:28am UTC](https://forum.ansible.com/t/unable-to-detect-ubuntu-flavour/22699/2 "2016-10-03T09:28:31Z")

</div>

> when gathering facts from a server, ubuntu release version comes back as NA.  
> Has anyone experienced this ?
> 
> from my server
> 
> No LSB modules are available.  
> Distributor ID: Ubuntu  
> Description: Ubuntu 14.04.5 LTS  
> Release: 14.04  
> Codename: trusty
> 
> but ansible reports ubuntu release as NA

Ansible is using the Python module platform to get this information, and platform is reading /etc/lsb-release first.  
Do you have that file?

> ansible all -l server -m setup -a 'filter=ansible\_distribution\_release'  
> server | SUCCESS =\> {  
> &nbsp;&nbsp;&nbsp;&nbsp;"ansible\_facts": {  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_distribution\_release": "NA"  
> &nbsp;&nbsp;&nbsp;&nbsp;},  
> &nbsp;&nbsp;&nbsp;&nbsp;"changed": false  
> }
> 
> Ansible version:
> 
> ansible 2.1.1.0  
> &nbsp;&nbsp;config file = /Users/mchristof/di/ansible/ansible.cfg  
> &nbsp;&nbsp;configured module search path = Default w/o overrides
> 
> python version on the server
> 
> Python 2.7.11

You can also check if the command Ansible is running is working on the node.  
python -c "import platform; print platform.dist()"

---

<div class="post-metadata">

**Author:** ![Mike\_C1](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@Mike\_C1](https://forum.ansible.com/u/Mike_C1)\
**Post date:** [October 3, 2016, 9:45am UTC](https://forum.ansible.com/t/unable-to-detect-ubuntu-flavour/22699/3 "2016-10-03T09:45:14Z")

</div>

# python -c “import platform; print platform.dist()”

(‘debian’, ‘jessie/sid’, ‘’)

# cat /etc/lsb-release

DISTRIB\_ID=Ubuntu  
DISTRIB\_RELEASE=14.04  
DISTRIB\_CODENAME=trusty  
DISTRIB\_DESCRIPTION=“Ubuntu 14.04.5 LTS”

This doesnt look good, but at least i have something to search for now.

Cheers
