From bf1308cd7f49dca9e80b11de45ef8d242159bc82 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Fri, 19 Jun 2020 09:09:57 -0500 Subject: [PATCH] mount - fix module_util pathing issue for ansible 2.9 In Ansible 2.9 (pre 2.10 routing), the AnsiballZ creation of the payload will add an extra directory to the module_util path because ismount.py shares the same name as it's parent dir which creates an inconsistency in the payload creation. This causes the Collection module ansible.posix.mount to work in Ansible 2.10 but not 2.9, with this pull request a simple renaming of the module_util which side steps this inconsistency. Fixes https://github.com/ansible-collections/ansible.posix/issues/21 Signed-off-by: Adam Miller --- changelogs/fragments/21-mount-module_util-routing-issue.yml | 3 +++ plugins/module_utils/{ismount.py => mount.py} | 0 plugins/modules/mount.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/21-mount-module_util-routing-issue.yml rename plugins/module_utils/{ismount.py => mount.py} (100%) diff --git a/changelogs/fragments/21-mount-module_util-routing-issue.yml b/changelogs/fragments/21-mount-module_util-routing-issue.yml new file mode 100644 index 00000000000..249b56b7fda --- /dev/null +++ b/changelogs/fragments/21-mount-module_util-routing-issue.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - mount - fix issues with ismount module_util pathing for Ansible 2.9 diff --git a/plugins/module_utils/ismount.py b/plugins/module_utils/mount.py similarity index 100% rename from plugins/module_utils/ismount.py rename to plugins/module_utils/mount.py diff --git a/plugins/modules/mount.py b/plugins/modules/mount.py index 1fbf7163ae1..8c22f66a1f4 100644 --- a/plugins/modules/mount.py +++ b/plugins/modules/mount.py @@ -176,7 +176,7 @@ import platform from ansible.module_utils.basic import AnsibleModule -from ansible_collections.ansible.posix.plugins.module_utils.ismount import ismount +from ansible_collections.ansible.posix.plugins.module_utils.mount import ismount from ansible.module_utils.six import iteritems from ansible.module_utils._text import to_bytes, to_native