issue #590: Ansible test for module_utils.distro use.

pull/595/head
David Wilson 6 years ago
parent 8f940e2ccb
commit 7a5c436a39

@ -0,0 +1,13 @@
#!/usr/bin/python
# issue #590: I am an Ansible new-style Python module that tries to use
# ansible.module_utils.distro.
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils import distro
def main():
module = AnsibleModule(argument_spec={})
module.exit_json(info=distro.info())
if __name__ == '__main__':
main()

@ -0,0 +1,9 @@
- hosts: test-targets
tasks:
- custom_python_uses_distro:
register: out
- assert:
that:
- "'id' in out.info"
Loading…
Cancel
Save