我正在将我们的ansible playbooks迁移到Salt,我在安装文件系统方面遇到了一些问题。
ansible剧本如下:
- name: Create mount point.
file: name=/mnt/nfs state=directory
- name: Mount dat.
mount: name=/mnt/nfs src=nfs-1:/data/nfs fstype=nfs state=mounted
这是我到目前为止的盐状态,它失败了:
create_mount_point:
file.directory:
- name: /mnt/nfs
mount_dat:
mount.mounted:
- name: /mnt/nfs
- device: nfs-1:/data/nfs
- mkmnt: True
- fstype: nfs
- require:
- file: create_mount_point
现在我承认我对在Ubuntu中挂载文件系统知之甚少。我从上面得到的错误是:
ID: mount_dat
Function: mount.mounted
Name: /mnt/nfs
Result: False
Comment: mount: wrong fs type, bad option, bad superblock on nfs-1:/data/nfs,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
Started: 00:26:26.717631
Duration: 141.096 ms
Changes:
也许有人可以指出我正确的方向?不确定使用'辅助程序'的建议在这种情况下是否有用,如果是,那么如何使用mount.mounted
状态。
答案 0 :(得分:1)
很可能你错过了一个包含nfs文件系统工具的软件包。基于ubuntu docs,它被称为nfs-common
。
这可能有所帮助的一些调试步骤:
salt-call state.sls [name of your mount sls] -l debug
。mount
命令