首页 > 解决方案 > Ansible mount with state:mounted not working for sshfs

问题描述

我想使用 ansible 在 Ubuntu 18.04 上的 fstab 中添加一个 sshfs 条目。

Ansible 更改了我的 fstab 并添加了正确的行来挂载远程 sshfs 文件系统。但state: mounted不起作用。它不会被安装。你有什么想法为什么?

- name: Adding fstab entry for borg remote mount point
  mount:
    path: /home/borg/backups-remote
    src: borg@myserver.com:/users/borg
    fstype: fuse.sshfs
    opts: "defaults,allow_other,_netdev,idmap=user,follow_symlinks,identityfile=/home/borg/.ssh/id_rsa,allow_other,default_permissions,uid={{ borg_user.uid }},gid={{ borg_user.group }}"
    state: mounted
  register: backup_remote

标签: stateubuntu-18.04mount

解决方案


推荐阅读