Good morning,

Would you guys help me to understand how to get the Ansible correct version
in the playbook?

I have newest Ansible:

(ansible) poe@lime:~$ pip3 freeze | grep ansible
ansible==*4.6.0*
ansible-core==*2.11.5*
(ansible) poe@lime:~$


But `ansible_version` displays core version instead of ansible:

(ansible) poe@lime:~$ ansible localhost -m debug -a
'var=ansible_version.full'
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | SUCCESS => {
    "ansible_version.full": "*2.11.5*"
}

Why is that so?

The same with `ansible --version`:

(ansible) poe@lime:~$ ansible --version | head -1
ansible [core *2.11.5*]

The only command I've found which showing Ansible (not core) version
instead is:

(ansible) poe@lime:~$ python -c 'from ansible_collections.ansible_release
import ansible_version; print(ansible_version)'
*4.6.0*

So the question is, is this expected? I mean, writing a playbook, I'd like
to make sure that Ansible 4.6 is used (or not older). But `ansible_version`
returns ansible core version - is something I should rely on instead?
What's going on here? :)

Best,
Piotr Kowalczyk

-- 


-------------------------------
This document contains material that is 
confidential in CodiLime Sp. z o.o. DO NOT PRINT. DO NOT COPY. DO NOT 
DISTRIBUTE. If you are not the intended recipient of this document, be 
aware that any use, review, retransmission, distribution, reproduction or 
any action taken in reliance upon this message is strictly prohibited. If 
you received this in error, please contact the sender and [email protected] 
<mailto:[email protected]>. Return the paper copy, delete the material from 
all computers and storage media.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADNHcE4_70DT8rcTgsHsJDS2S593JNySYKxCVTE0jz_DyCvt%2Bg%40mail.gmail.com.

Reply via email to