# Found Bug in current ansible Version in git

**URL:** <https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634>\
**Category:** Ansible Developer\
**Created:** [October 29, 2014, 3:17pm UTC](https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634 "2014-10-29T15:17:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joachim\_Setzer](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Joachim\_Setzer](https://forum.ansible.com/u/Joachim_Setzer)\
**Post date:** [October 29, 2014, 3:17pm UTC](https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634/1 "2014-10-29T15:17:23Z")

</div>

Hi all,

I have chacked out current ansible Version:  
ansible 1.8 (devel cd9ea13716) last updated 2014/10/28 22:08:28 (GMT +200)  
lib/ansible/modules/core: (devel 63e81cfc2e) last updated 2014/10/28 22:08:12 (GMT +200)  
lib/ansible/modules/extras: (devel 70c7e69b62) last updated 2014/10/28 15:40:03 (GMT +200)  
v2/ansible/modules/core: (devel 63e81cfc2e) last updated 2014/10/28 22:08:12 (GMT +200)  
v2/ansible/modules/extras: (devel 70c7e69b62) last updated 2014/10/28 15:40:03 (GMT +200)  
configured module search path = None

Maybe this is a BUG ?  
 → how can it be fixed ?

when I try to execute the comand:  
ansible all -m setup -a “filter=ansible\_distribution\*”  
I get the following **WRONG** result:

localhost | success \>\> {  
“ansible\_facts”: {  
“ansible\_distribution”: “Suse”,  
“ansible\_distribution\_major\_version”: “11”,  
**“ansible\_distribution\_release”: “x86\_64”,**  
“ansible\_distribution\_version”: “11”  
},  
“changed”: false  
}

My OS is a Suse Enterprise Linux 11 SP3:  
[suse01i:~/src](mailto:2@suse01i:~/src)\> uname -a  
Linux suse01i 3.0.101-0.35-default #1 SMP Wed Jul 9 11:43:04 UTC 2014 (c36987d) x86\_64 x86\_64 x86\_64 GNU/Linux

[suse01i:~/src](mailto:2@suse01i:~/src)\> cat /etc/SuSE-release  
SUSE Linux Enterprise Server 11 (x86\_64)  
VERSION = 11  
PATCHLEVEL = 3

I found the cause of this issue in:  
\<ANSIBLE\_DIR\>lib/ansible/module\_utils/facts.py

I have changed the following:  
— a/lib/ansible/module\_utils/facts.py  
+++ b/lib/ansible/module\_utils/facts.py  
@@ -329,9 +329,10 @@ class Facts(object):  
elif path == ‘/etc/SuSE-release’:  
data = data.splitlines()  
for line in data:  
**- release = re.search(‘CODENAME \*= \*([^\n]+)’, line)**  
**+ release = re.search(‘PATCHLEVEL \*= \*([^\n]+)’, line)**  
if release:  
self.facts[‘distribution\_release’] = release.groups()[0].strip()

---

<div class="post-metadata">

**Author:** ![Jonathan\_Mainguy](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jonathan\_Mainguy](https://forum.ansible.com/u/Jonathan_Mainguy)\
**Post date:** [October 29, 2014, 3:30pm UTC](https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634/2 "2014-10-29T15:30:49Z")

</div>

Seems to be a few bugs with setup and Suse, have a look at [https://github.com/ansible/ansible/pull/9440](https://github.com/ansible/ansible/pull/9440) which will show you some proposed fixes. I dont remember checking for **“ansible\_distribution\_release”** yesterday when working on this, so if its still broken, you will want to create a PR.

---

<div class="post-metadata">

**Author:** ![Joachim\_Setzer](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Joachim\_Setzer](https://forum.ansible.com/u/Joachim_Setzer)\
**Post date:** [October 29, 2014, 3:50pm UTC](https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634/3 "2014-10-29T15:50:38Z")

</div>

Hi Jonathan,

the “BUG” is still there (I have checked out version from today)  
 → I will try it tommorow again.

By the way: how can I contribute bugfixed ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 5:19pm UTC](https://forum.ansible.com/t/found-bug-in-current-ansible-version-in-git/16634/4 "2014-10-30T17:19:29Z")

</div>

Hi Joachim,

You can read info about that here: [http://docs.ansible.com/community.html](http://docs.ansible.com/community.html)

Thanks!

–Michael
