global name 'ANSIBLE_VERSION' is not defined

154 views
Skip to first unread message

Nicolás Rusconi

unread,
May 31, 2016, 9:10:05 PM5/31/16
to Ansible Project
I am getting this error when running ansible 2.1.0.0

An exception occurred during task execution. The full traceback is:

Traceback (most recent call last):

  File "/var/folders/c7/wbkyhcfj69dcsvp3464g0knh0000gn/T/ansible_psAqud/ansible_module_blockinfile.py", line 290, in <module>

    main()

  File "/var/folders/c7/wbkyhcfj69dcsvp3464g0knh0000gn/T/ansible_psAqud/ansible_module_blockinfile.py", line 226, in main

    if ANSIBLE_VERSION.startswith('1.'):

NameError: global name 'ANSIBLE_VERSION' is not defined



maybe this issue is happening again? 

https://github.com/ansible/ansible/issues/11545


any recomendations on how to fix it?


Thanks!


Brian Coca

unread,
Jun 1, 2016, 9:27:26 AM6/1/16
to ansible...@googlegroups.com
ANSIBLE_VERSION was removed in 2.1 and all modules that depended on it were fixed in devel, but it seems blockinfile in 2.1 still uses it.

I've pushed a fix to stable-2.1 and it should be out in a possible 2.1.1 or eventually in 2.2


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages