tests: Fix Ansible module shebangs

With https://github.com/ansible/ansible/pull/76677 Ansible
fixed shebang substitution for Ansible modules and tightened
up what shebang is allowed.

Changing these fixes the tests using them with vanilla Ansible.

https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/shebang.html
pull/1032/head
Alex Willmer 3 months ago
parent 9a9dd66ba0
commit bde7f062b9

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible new-style Python module. I return details about the Python
# interpreter I run within.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I expect the quote from modules2/module_utils/joker.py.
from ansible.module_utils.basic import AnsibleModule

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.externalpkg import extmod

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible Python JSONARGS module. I should receive an encoding string.
json_arguments = """<<INCLUDE_ANSIBLE_MODULE_JSON_ARGS>>"""

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible new-style Python module. I leak state from each invocation
# into a class variable and a global variable.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible new-style Python module. I modify the process environment and
# don't clean up after myself.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible new-style Python module. I should receive an encoding string.
import sys

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# #591: call os.getcwd() before AnsibleModule ever gets a chance to fix up the
# process environment.

@ -1,4 +1,5 @@
#!/usr/bin/env python
#!/usr/bin/python
# issue #555: I'm a module that cutpastes an old hack.
from ansible.module_utils.basic import AnsibleModule

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible new-style Python module. I run the script provided in the
# parameter.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# issue #590: I am an Ansible new-style Python module that tries to use
# ansible.module_utils.distro.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am an Ansible Python WANT_JSON module. I should receive a JSON-encoded file.
import json

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# I am a module that indirectly depends on glibc cached /etc/resolv.conf state.

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>

Loading…
Cancel
Save