1

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
crusadecoder
  • 651
  • 1
  • 11
  • 26

1 Answers1

1

It seems like there is a bug, there is an open issue #22930.

streetturtle
  • 5,472
  • 2
  • 25
  • 43