Skip to content

win_acl_inheritance does not support UNC path with the recent commit #408

@aaronk1

Description

@aaronk1
SUMMARY

win_acl_inheritance checks for a path qualifier. Path qualifier is not supported on a network path.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_acl_inheritance

ANSIBLE VERSION
ansible [core 2.11.12]
COLLECTION VERSION
ansible.windows 1.11.1
CONFIGURATION
ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True
CALLBACKS_ENABLED(env: ANSIBLE_CALLBACK_WHITELIST) = ['profile_tasks', 'timer', 'junit']
COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = ['/root/.ansible/collections', '/projdev/collections', '/usr/share/ansible/collections']
DEFAULT_ACTION_PLUGIN_PATH(env: ANSIBLE_ACTION_PLUGINS) = ['/usr/share/venv/lib/python3.7/site-packages/ara/plugins/action']
DEFAULT_CALLBACK_PLUGIN_PATH(env: ANSIBLE_CALLBACK_PLUGINS) = ['/usr/share/venv/lib/python3.7/site-packages/ara/plugins/callback']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True
DEFAULT_LOOKUP_PLUGIN_PATH(env: ANSIBLE_LOOKUP_PLUGINS) = ['/usr/share/venv/lib/python3.7/site-packages/ara/plugins/lookup']
DEFAULT_MODULE_PATH(env: ANSIBLE_LIBRARY) = ['/Users/MYUSERNAME/library']
DEFAULT_MODULE_UTILS_PATH(/etc/ansible/ansible.cfg) = ['/root/.ansible/module_utils', '/opt/projcs/ansible/ansible_plugins/module_utils', '/projdev/module_utils']
DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = ['/Users/MYUSERNAME/git/roles']
DEFAULT_VERBOSITY(env: ANSIBLE_VERBOSITY) = 3
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False
OS / ENVIRONMENT

VMware Photon OS 3.0

STEPS TO REPRODUCE

Specify path parameter as any UNC network path instead of a local filesystem path.

- name: Remove Inheritence on UNC path
   win_acl_inheritance_ws1cs:
     path: \\amznfsx8sjdj59.my.lab\D$\Path\Customer
     state: absent
EXPECTED RESULTS

Skip splitting of the path qualifier and finish setting inheritance as needed

ACTUAL RESULTS
The full traceback is:
You cannot call a method on a null-valued expression.
At line:98 char:1
+ $pathQualifier = $pathQualifier.Replace(':', '')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvokeMethodOnNull

ScriptStackTrace:
at <ScriptBlock>, <No file>: line 98
fatal: [servername.my.lab]: FAILED! => {
    "changed": false,
    "msg": "Unhandled exception while executing module: You cannot call a method on a null-valued expression."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions