Merge remote-tracking branch 'origin/dmw'
* origin/dmw: issue #555: ansible: workaround ancient reload(sys) hack.pull/564/head
commit
fda1647ad0
@ -0,0 +1,10 @@
|
|||||||
|
# issue #555
|
||||||
|
|
||||||
|
- name: integration/runner/custom_python_prehistoric_module.yml
|
||||||
|
hosts: test-targets
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
- custom_python_prehistoric_module:
|
||||||
|
register: out
|
||||||
|
|
||||||
|
- assert: that=out.ok
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# issue #555: I'm a module that cutpastes an old hack.
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils.basic import get_module_path
|
||||||
|
from ansible.module_utils import six
|
||||||
|
|
||||||
|
import os
|
||||||
|
import pwd
|
||||||
|
import socket
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import sys
|
||||||
|
reload(sys)
|
||||||
|
sys.setdefaultencoding('utf8')
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
module = AnsibleModule(argument_spec={})
|
||||||
|
module.exit_json(ok=True)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
Loading…
Reference in New Issue