Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] MODULE FAILURE\nSee stdout/stderr for the exact error #6

Open
ponsfrilus opened this issue Oct 4, 2022 · 0 comments
Open

[bug] MODULE FAILURE\nSee stdout/stderr for the exact error #6

ponsfrilus opened this issue Oct 4, 2022 · 0 comments

Comments

@ponsfrilus
Copy link
Member

The # -*- coding: utf-8 -*- command annexed to the she bang seems to fail with latest version of ansible. The faulty part stands in https://github.com/epfl-si/ansible-module-openshift/blob/master/library/_openshift.py#L1

When launching ansible we have this error:

TASK [roles/epfl.polylex : Polylex BuildConfig] **************************************************************************
task path: /home/nborboen/Dev/fsd/wp-polylex/ansible/roles/epfl.polylex/tasks/main.yml:1
[DEPRECATION WARNING]: openshift is kept for backwards compatibility but usage is discouraged. The module documentation 
details page may explain more about this rationale. This feature will be removed in a future release. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
<wwp-test> ESTABLISH LOCAL CONNECTION FOR USER: nborboen
<wwp-test> EXEC /bin/sh -c 'echo ~nborboen && sleep 0'
<wwp-test> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/nborboen/.ansible/tmp `"&& mkdir "` echo /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446 `" && echo ansible-tmp-1664892121.9361188-148603-273021196132446="` echo /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446 `" ) && sleep 0'
Using module file /home/nborboen/Dev/fsd/wp-polylex/ansible/ansible-deps-cache/roles/epfl_si.ansible_module_openshift/library/_openshift.py
<wwp-test> PUT /home/nborboen/.ansible/tmp/ansible-local-148575qozhgags/tmps40i_z1i TO /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446/AnsiballZ__openshift.py
<wwp-test> EXEC /bin/sh -c 'chmod u+x /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446/ /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446/AnsiballZ__openshift.py && sleep 0'
<wwp-test> EXEC /bin/sh -c '/home/nborboen/Dev/fsd/wp-polylex/ansible/ansible-deps-cache/bin/python3 # -*- coding: utf-8 -*- /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446/AnsiballZ__openshift.py && sleep 0'
fatal: [wwp-test]: FAILED! => {
    "changed": false,
    "module_stderr": "",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 0
}

Relaunching Ansible with keeping the temporary files (ANSIBLE_KEEP_REMOTE_FILES=1) we can observe the following:

❯ cat /home/nborboen/.ansible/tmp/ansible-tmp-1664892121.9361188-148603-273021196132446/AnsiballZ__openshift.py | head -5
#!/home/nborboen/Dev/fsd/wp-polylex/ansible/ansible-deps-cache/bin/python3 # -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
_ANSIBALLZ_WRAPPER = True # For test-module.py script to tell this is a ANSIBALLZ_WRAPPER
# This code is part of Ansible, but is an independent component.
# The code in this particular templatable string, and this templatable string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant