Reputation: 435
We've recently created an azure file share with terraform, and mounted the Z: to the azure file share from a windows 2019 server.
I'm now trying to create a folder in that share, with ansible and win_file.
- name: create folder in share
win_file:
path: //filesharename/foldername
state: directory
vars:
ansible_become: yes
ansible_become_method: runas
ansible_become_user: User that MS gave us to mount the share with
ansible_become_pass: storage account key used with the user name above
ansible_become_flags: logon_type=new_credentials logon_flags=netcredentials_only
I'm continuously getting a network share does not exist error, or if I use the drive letter, Z, same error, drive with that letter does not exist.
I've also tried using an local administrator account from the windows machine for the user and pass, same error.
Anyone got any ideas what's going on here or anything I can try?
Upvotes: 0
Views: 506
Reputation: 435
Worked it out, dumbass mistake
The path I was using was incorrect
I was using
\\storage_account_name.file.core.windows.net\foldername
Should have been using
\\storage_account_name.file.core.windows.net\sharename\foldername
With the original user/pass details from MS
Upvotes: 1