Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带凭证文件的Ansible装载_Ansible_Mount_Mount Point - Fatal编程技术网

带凭证文件的Ansible装载

带凭证文件的Ansible装载,ansible,mount,mount-point,Ansible,Mount,Mount Point,我有一个包含装载任务的剧本,当我尝试使用凭证选项时,它似乎失败了 下面的任务成功了 - 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

我有一个包含装载任务的剧本,当我尝试使用
凭证
选项时,它似乎失败了

下面的任务成功了

- 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"
而下面的一个失败,并显示缺少凭据的相关错误消息

- 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"
下面是凭证文件的内容

   [root@localhost]# cat /root/secretcreds 
                      username=john
                      password=secretpass

似乎有一个bug,有一个未解决的问题