gliech.lxd
LXD 服务器 Ansible 角色
这个 Ansible 角色通过操作系统的包管理器安装 LXD,并使用预设对象进行配置。
需求
无。
角色变量
名称 | 必需 | 类型 / 选择 | 描述 |
---|---|---|---|
lxd_config |
是 | 对象 |
LXD 预设配置对象。有关详细信息,请参见 LXD 文档。如果希望幂等性检查正常工作,您必须确保不漏掉 示例:
|
lxd_extra_users |
否 | 列表(字符串) |
该角色将始终将 ansible 用户添加到 lxd 组,以便它可以通过 lxd Unix 套接字与该角色中执行的某些任务进行通信。您可以选择使用此变量指定要添加到组中的其他用户名。 默认值: |
lxd_subid_offset |
否 | 整数 |
在 默认值: |
lxd_subid_range |
否 | 整数 |
在 默认值: |
依赖
无。
示例剧本
- hosts: container_host
tasks:
- ansible.builtin.import_role:
name: gliech.lxd
vars:
lxd_config:
config: {}
networks: []
storage_pools:
- config:
source: /var/lib/lxd/storage-pools/default
description: ""
name: default
driver: dir
profiles:
- config:
security.privileged: "true"
description: 默认的 LXD 配置文件
devices:
root:
path: /
pool: default
type: disk
name: default
projects:
- config:
features.images: "true"
features.networks: "true"
features.networks.zones: "true"
features.profiles: "true"
features.storage.buckets: "true"
features.storage.volumes: "true"
description: 默认的 LXD 项目
name: default
许可证
本项目根据 GNU 通用公共许可证 v3.0 进行许可。
安装
ansible-galaxy install gliech.lxd
许可证
gpl-3.0
下载
277
拥有者