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

This commit is contained in:
David Wilson 2019-06-02 13:08:44 +01:00
parent 8f940e2ccb
commit 7a5c436a39
2 changed files with 22 additions and 0 deletions

View File

@ -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()

View File

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