Hi Dick Visser,
Please find the below requested details:-
-------------------------------------------------------------
-------------------------------------------------------------
:~$ ansible-galaxy collection list -p /home/test/
[DEPRECATION WARNING]: DEFAULT_GATHER_SUBSET option, the module_defaults
keyword is a more generic version and can apply to all calls to the
M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions, use
module_defaults
instead. This feature will be removed from ansible-core in version 2.18.
Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg.
# /home/test/ansible_collections
Collection Version
----------------- -------
ansible.posix 1.5.4
ansible.utils 2.10.3
community.general 4.6.1
:~$
:~$ ansible --version
ansible-playbook [core 2.15.2]
config file = /home/test/ansible.cfg
configured module search path = ['/home/test/modules']
ansible python module location =
/usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /home/test
executable location = /usr/local/bin/ansible-playbook
python version = 3.9.16 (main, Dec 21 2022, 10:57:18) [GCC 8.5.0 20210514
(Red Hat 8.5.0-17)] (/usr/bin/python3.9)
jinja version = 3.1.2
libyaml = False
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
*:~$ cat test.yml*
---
- name: Fail test
hosts: localhost
any_errors_fatal: true
vars:
CASSANDRA:
distribution: dse
pre_tasks:
- fail:
msg: "Cassandra distribution '{{ CASSANDRA.distribution|d(distribution) }}'
is not valid"
when:
- CASSANDRA.distribution|d(distribution) not in ('dse', 'apache_cassandra')
- '"test" not in ansible_run_tags'
tasks:
- debug: msg="{{ CASSANDRA.distribution }}"
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
-------------------------------------------------------------
:~$ ansible-playbook test.yml -vv
ansible-playbook [core 2.15.2]
config file = /home/test/ansible.cfg
configured module search path = ['/home/test/modules']
ansible python module location =
/usr/local/lib/python3.9/site-packages/ansible
ansible collection location = /home/test
executable location = /usr/local/bin/ansible-playbook
python version = 3.9.16 (main, Dec 21 2022, 10:57:18) [GCC 8.5.0 20210514
(Red Hat 8.5.0-17)] (/usr/bin/python3.9)
jinja version = 3.1.2
libyaml = False
Using /home/test/ansible.cfg as config file
[DEPRECATION WARNING]: DEFAULT_GATHER_SUBSET option, the module_defaults
keyword is a more generic version and can apply to all calls to the
M(ansible.builtin.gather_facts) or M(ansible.builtin.setup) actions, use
module_defaults
instead. This feature will be removed from ansible-core in version 2.18.
Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg.
[WARNING]: Skipping plugin
(/usr/local/lib/python3.9/site-packages/ansible/plugins/callback/selective.py),
cannot load: cannot import name 'codeCodes' from 'ansible.utils.color'
(/usr/local/lib/python3.9/site-
packages/ansible/utils/color.py)
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.
PLAYBOOK: test.yml
**************************************************************************************************************************************************************************************************************************
1 plays in test.yml
PLAY [Fail test]
****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts]
**********************************************************************************************************************************************************************************************************************
task path: /home/test/test.yml:2
ok: [localhost]
TASK [fail]
*********************************************************************************************************************************************************************************************************************************
task path: /home/test/test.yml:9
redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr
[WARNING]: An unexpected error occurred during Jinja2 plugin loading:
'NoneType' object has no attribute '_original_path'
redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr
redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr
redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr
redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr
skipping: [localhost] => {"changed": false, "false_condition":
"CASSANDRA.distribution|d(distribution) not in ('dse',
'apache_cassandra')", "skip_reason": "Conditional result was False"}
TASK [debug]
********************************************************************************************************************************************************************************************************************************
task path: /home/test/test.yml:15
ok: [localhost] => {
"msg": "dse"
}
PLAY RECAP
**********************************************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0
skipped=1 rescued=0 ignored=0
-------------------------------------------------------------
-------------------------------------------------------------
In the ansible logs you will able to see the below message:-
*[WARNING]: An unexpected error occurred during Jinja2 plugin loading:
'NoneType' object has no attribute '_original_path'*
*redirecting (type: filter) ansible.builtin.ipaddr to
ansible.netcommon.ipaddr*
Can you please help with this ?
On Fri, Aug 11, 2023 at 6:15 PM Dick Visser <[email protected]> wrote:
> That is very little information.
> How can we reproduce this issue?
> Minimum playbook etc??
>
>
> On Fri, 11 Aug 2023 at 14:34, Dhirender Yadav <[email protected]>
> wrote:
>
>> Hi Team,
>>
>> Recently we have upgraded to ansible 2.15 and we are getting below
>> WARNINGS.
>>
>> TASK [fail]
>> *************************************************************************************************************************************************
>> [WARNING]: An unexpected error occurred during Jinja2 plugin loading:
>> 'NoneType' object has no attribute '_original_path'
>>
>>
>> --
>>
>> *Regards,*
>> *Dhirender Yadav*
>>
>> --
>> 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/CACSTsYS6L-3SA-bZFnHF5t%3DcrCSyWywsELTW5vFS7%2BayGj5iGQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CACSTsYS6L-3SA-bZFnHF5t%3DcrCSyWywsELTW5vFS7%2BayGj5iGQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from Gmail Mobile
>
> --
> 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/CAF8BbLb67W%2BEZCrsvMW%2BsoJ61jd9FegKZJivQFxR-FEUgMe_Eg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAF8BbLb67W%2BEZCrsvMW%2BsoJ61jd9FegKZJivQFxR-FEUgMe_Eg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
*Regards,*
*Dhirender Yadav*
--
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/CACSTsYQ00t2AFCHB2i%3DFJAvsDf4t6DELfv-Azg1D8ZFdNE5k-w%40mail.gmail.com.