unable to detect ubuntu flavour ?

61 views
Skip to first unread message

Mike Christofilopoulos

unread,
Oct 1, 2016, 1:10:19 PM10/1/16
to Ansible Project
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 all  -l server -m setup -a 'filter=ansible_distribution_release'
server | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution_release": "NA"
    },
    "changed": false
}
```

Ansible version:

```
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

```
Python 2.7.11
```

Kai Stian Olstad

unread,
Oct 3, 2016, 5:28:45 AM10/3/16
to ansible...@googlegroups.com
On 01.10.2016 19:10, Mike Christofilopoulos wrote:
> 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 => {
> "ansible_facts": {
> "ansible_distribution_release": "NA"
> },
> "changed": false
> }
>
> Ansible version:
>
> 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
>
> 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()"

--
Kai Stian Olstad

Mike Christofilopoulos

unread,
Oct 3, 2016, 5:45:14 AM10/3/16
to Ansible Project, ansible-pr...@olstad.com
# 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
Reply all
Reply to author
Forward
0 new messages