ngine_io.cloudstack.cs_iso 模块 – 管理基于 Apache CloudStack 云的 ISO 镜像。
注意
此模块是 ngine_io.cloudstack 集合 (版本 2.5.0) 的一部分。
如果您使用的是 ansible
软件包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install ngine_io.cloudstack
。您需要其他要求才能使用此模块,有关详细信息,请参见 要求。
要在 playbook 中使用它,请指定:ngine_io.cloudstack.cs_iso
。
ngine_io.cloudstack 0.1.0 中的新增功能
概要
注册和删除 ISO 镜像。
要求
执行此模块的主机需要以下要求。
python >= 2.6
cs >= 0.9.0
参数
参数 |
注释 |
---|---|
ISO 相关的账户。 |
|
用于查询 API 端点的 HTTP 方法。 如果未给出,则考虑 选项
|
|
CloudStack API 的 API 密钥。 如果未给出,则考虑 |
|
CloudStack API 的密钥。 如果未设置,则考虑 |
|
HTTP 超时时间(秒)。 如果未给出,则考虑 默认值: |
|
CloudStack API 的 URL,例如 https://cloud.example.com/client/api。 如果未给出,则考虑 |
|
验证 CA 授权证书文件。 如果未给出,则考虑 |
|
注册 ISO 为可引导的。仅在 *state* 为 present 时使用。 选项
|
|
此 ISO 的 MD5 校验和值。如果设置,我们将按校验和而不是名称搜索。 |
|
ISO 是否应在区域之间同步或删除。 与 *zone* 互斥。 选项
|
|
ISO 的显示文本。 如果未指定,则使用 *name*。 |
|
ISO 相关的域。 |
|
注册安装了 XS/VMware 工具的 ISO 以支持 VM cpu/内存的动态缩放。仅在 *state* 为 present 时使用。 选项
|
|
注册 ISO 为特色。仅在 *state* 为 present 时使用。 选项
|
|
注册 ISO 为对所有用户公开可用。仅在 *state* 为 present 时使用。 选项
|
|
此标志用于搜索现有的 ISO。如果设置为 选项
|
|
用于搜索 ISO 的过滤器的名称。 选项
|
|
ISO 的名称。 |
|
最能代表此 ISO 操作系统的 OS 名称。如果 iso 可引导,则需要传递此参数。如果 *state* 为 present,则必需。 |
|
轮询异步作业,直到作业完成。 选项
|
|
要注册 ISO 的项目的名称。 |
|
ISO 的状态。 选项
|
|
标签列表。标签是具有键 *key* 和 *value* 的字典列表。 要删除所有标签,请设置一个空列表,例如 *tags: []*。 |
|
可以从中下载 ISO 的 URL。如果 *state* 为 present,则必需。 |
|
如果 如果未给出,则考虑 这应该仅用于使用自签名证书的个人控制站点。 选项
|
|
您希望注册或删除 ISO 的区域的名称。 当 *cross_zones* 为 |
备注
注意
有关 cloudstack 模块的详细指南,请参阅 CloudStack 云指南。
此模块支持检查模式。
示例
- name: Register an ISO if ISO name does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
- name: Register an ISO with given name if ISO md5 checksum does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
checksum: 0b31bccccb048d20b551f70830bb7ad0
- name: Remove an ISO by name
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
state: absent
- name: Remove an ISO by checksum
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
checksum: 0b31bccccb048d20b551f70830bb7ad0
state: absent
返回值
公共返回值已在此处记录 此处,以下是此模块特有的字段
键 |
描述 |
---|---|
ISO 相关的账户。 返回值: success 示例: |
|
如果 ISO 可引导,则为 True。 返回值: success 示例: |
|
ISO 的 MD5 校验和。 返回值: success 示例: |
|
注册日期。 返回值: success 示例: |
|
如果 ISO 在所有区域都受管理,则为 true,否则为 false。 返回值: success 示例: |
|
要显示的 ISO 文本。 返回值: success 示例: |
|
ISO 相关的域。 返回值: success 示例: |
|
ISO 的格式。 返回值: success 示例: |
|
ISO 的 UUID。 返回值: success 示例: |
|
如果 ISO 已启用,则为 True。 返回值: success 示例: |
|
如果 ISO 为公共的,则为 True。 返回值: success 示例: |
|
如果 ISO 已准备好部署,则为 True。 返回值: success 示例: |
|
ISO 的名称。 返回值: success 示例: |
|
操作系统的类型。 返回值: success 示例: |
|
ISO 相关的项目。 返回值: success 示例: |
|
ISO 的状态。 返回值: success 示例: |
|
与 ISO 关联的资源标签列表。 返回值: success 示例: |
|
注册 ISO 的区域名称。 返回值: success 示例: |