小编Dam*_*ian的帖子

如何使用 zfs-linux 使用 ansible 创建 zfs 文件系统/zpool

我希望使用 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
Run Code Online (Sandbox Code Playgroud)

linux zfs ansible

5
推荐指数
2
解决办法
6628
查看次数

标签 统计

ansible ×1

linux ×1

zfs ×1