我正在将我们的ansible剧本迁移到Salt,而且我在安装文件系统时遇到了一些问题。
本手册如下:
- 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状态。
发布于 2017-02-25 07:42:33
很可能您错过了nfs文件系统工具的包。基于ubuntu博士,它被称为nfs-common。
一些调试步骤在这里可能会有所帮助:
salt-call state.sls [name of your mount sls] -l debug的仆从。mount命令https://stackoverflow.com/questions/42450478
复制相似问题