ansible-for-nsxt icon indicating copy to clipboard operation
ansible-for-nsxt copied to clipboard

Modify shebang to use ansible_python_interpreter

Open austlane opened this issue 1 year ago • 1 comments

The vmware.ansible-for-nsxt module currently breaks ansible module convention by using the env shebang.

#!/usr/bin/env python

From the Ansible Docs:

Using #!/usr/bin/env, makes env the interpreter and bypasses ansible_<interpreter>_interpreter logic.

On machines without a symlink from python to python3, the current implementation is broken.

With this change, the python interpreter is selected by the ansible_python_interpreter.

See:

  • https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding
  • https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery

austlane avatar Mar 14 '23 21:03 austlane