On 30.09.2019 13:35, Daniel Delin wrote:
> *If I check the fact cache file it looks like this on both 2.7.10 and
> 2.8.4, which seems correct:*
>
> "ansible_distribution": "AIX",
> * "ansible_distribution_major_version": "5", *
> "ansible_distribution_release": "3",
> "ansible_distribution_version": "5.3",
>
>
> *However, if I debug the variables in the playbook, major version is wrong
> when running 2.8.4, which makes the import of our variable file fail:*
>
>
> TASK [op5 : debug]
> ***********************************************************************************************************************************************
> ok: [xxxx.xxxx.xxxx] => {
> "ansible_distribution": "AIX"
> }
>
> TASK [op5 : debug]
> ***********************************************************************************************************************************************
> ok: [xxxx.xxxx.xxxx] => {
> *"ansible_distribution_major_version": "5.3"*
>
>
> Could this be a bug ? It doesn´t seem correct that the facts differ from
> the debug.
This look like a bug, but when I check the code distribution_major_version for AIX is not changed between 2.7.10 and 2.8.4, only distribution_version and distribution_release has some changes.
The fact is parsing the output of /usr/bin/oslevel what output do you get from that command?
--
Kai Stian Olstad