Reputation: 669
I have a playbook containing a mount task which seems to be failing when i try using the credentials
option.
The task below succeeds
- name: "mount share"
mount:
state: "mounted"
fstype: "cifs"
name: "/opt/shared"
src: "//192.168.2.5/my_shared_drive"
opts: "username=john,password=secretpass,file_mode=0644,dir_mode=0755,gid=root,uid=root"
While the one below fails with a credentials missing related error message.
- name: "mount share"
mount:
state: "mounted"
fstype: "cifs"
name: "/opt/shared"
src: "//192.168.2.5/my_shared_drive"
opts: "credentials=/root/secretcreds,file_mode=0644,dir_mode=0755,gid=root,uid=root"
Below is the content of the credentials file
[root@localhost]# cat /root/secretcreds
username=john
password=secretpass
Upvotes: 1
Views: 1697