0
我正在將我們的ansible劇本遷移到Salt,並且在安裝文件系統時遇到了一些問題。在SaltStack中安裝文件系統時遇到的困難
的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
狀態配合使用。
感謝@dahrens,我會檢查出來 –