Hi,

Noticed that a few of our playbooks failed to run on AIX after trying to 
move from 2.7.10 to 2.8.4
I´ve tracked it down to handling of the ansible_distribution_major_version 
fact.

*We include variables in the playbooks like this:*

  - name: Include OP5 varibles.
    include_vars: "{{ item }}"
    with_first_found:
     - "{{ ansible_distribution }}{{ ansible_distribution_major_version 
}}.yml"
     - "other_os.yml"

This fails in 2.8 since the file supposed to be included is named AIX5.yml 
, but in 2.8 the variable is set to "5.3"

*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.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/449e2abc-4acc-40dc-953b-2b0ae382e6e7%40googlegroups.com.

Reply via email to