1

Im trying to modify winshare permissions depending on yaml list that follows:

Name:
  path: C:\sharepath
  Full:
    - DOMAIN\USER
    - DOMAIN\USER2

I have imported that list to my ansible code

- name: Shareperm
  win_share:
    name: "{{ Name }} 
    path: "{{ Name.path }}"
    full: "{{ Name.Full  | default(omit) | join(', ') }}"

That code gives me an error

account_name _ is not a valid account, cannot get SID: Exception calling "Translate" with "1" argument(s): "Some or all identity references could not be translated.

What am I missing to pass argument list containing escape character \ correct way (string - comma separated) according to https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_share_module.html

Nav
  • 78
  • 10
  • In most modern contexts, Windows supports the `USER@DOMAIN` syntax; if you believe the problem is the backslash, you could try that notation. You will also likely learn a lot more by turning up the ansible verbosity `-vvvv` as it will usually include the python traceback allowing you to look at the actual source that is failing, since that error isn't exactly descriptive – mdaniel Jan 03 '22 at 15:43

0 Answers0