我希望使用 ansible 中的 zfs 模块生成以下等效内容,以下内容使用命令行工作,但在第二次运行时失败,因为文件系统已经存在。
在此实例中,{{part_postgres}} 设置为 /dev/sdb。
zpool create -O 压缩=gzip postgres {{part_postgres }} -O secondarycache=all
目前在 ansible 中我有:
- name: Create postgres zpool
    zfs: name=postgres{{ part_postgres }}
         compression=gzip
         state=present
         secondarycache=all
         mountpoint=/postgres
         atime=off