diff --git a/test/integration/targets/plugin_loader/normal/library/_symlink.py b/test/integration/targets/plugin_loader/normal/library/_symlink.py new file mode 120000 index 00000000000..c4142e74d43 --- /dev/null +++ b/test/integration/targets/plugin_loader/normal/library/_symlink.py @@ -0,0 +1 @@ +_underscore.py \ No newline at end of file diff --git a/test/integration/targets/plugin_loader/normal/library/_underscore.py b/test/integration/targets/plugin_loader/normal/library/_underscore.py new file mode 100644 index 00000000000..7a416a64879 --- /dev/null +++ b/test/integration/targets/plugin_loader/normal/library/_underscore.py @@ -0,0 +1,13 @@ +#!/usr/bin/python +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + + +def main(): + print(json.dumps(dict(changed=False, source='legacy_library_dir'))) + + +if __name__ == '__main__': + main() diff --git a/test/integration/targets/plugin_loader/normal/underscore.yml b/test/integration/targets/plugin_loader/normal/underscore.yml new file mode 100644 index 00000000000..fb5bbad7fc9 --- /dev/null +++ b/test/integration/targets/plugin_loader/normal/underscore.yml @@ -0,0 +1,15 @@ +- hosts: testhost + gather_facts: false + tasks: + - name: Load a deprecated module + underscore: + register: res + + - name: Load a deprecated module that is a symlink + symlink: + register: sym + + - assert: + that: + - res.source == 'legacy_library_dir' + - sym.source == 'legacy_library_dir'