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

Invalid JSON issue #4

Closed
dadlex opened this issue Jun 21, 2018 · 1 comment
Closed

Invalid JSON issue #4

dadlex opened this issue Jun 21, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dadlex
Copy link
Contributor

dadlex commented Jun 21, 2018

For now runner.py breaks when it tries to retrieve the JSON created by AnsibleModule on any YAML playbook.
runner.py, line 25:
module = AnsibleModule(argument_spec=arguments, supports_check_mode=True)

Error message:
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error: Module unable to decode valid JSON on stdin. Unable to figure out what parameters were passed"}

@dadlex dadlex added the bug Something isn't working label Jun 21, 2018
@l0ki000 l0ki000 assigned l0ki000 and marsofandrew and unassigned l0ki000 Jun 22, 2018
@l0ki000
Copy link
Collaborator

l0ki000 commented Jun 22, 2018

the key is to have

ANSIBLE_METADATA = {'metadata_version': '0.1',
                    'status': ['unstableinterface'],
                    'supported_by': 'students'}
from ansible.module_utils.basic import AnsibleModule

in module file, even if you are not using/calling AnsibleModule
seems that by this import core ansible interpreting it as ANSIBALLZMODULE, not as old and unsupported JSON module.

@dadlex dadlex closed this as completed Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants