ngine_io.cloudstack.cs_configuration 模块 – 管理基于 Apache CloudStack 的云上的配置。
注意
此模块是 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_configuration
。
ngine_io.cloudstack 0.1.0 中的新增功能
概要
管理全局、区域、帐户、存储和集群配置。
要求
执行此模块的主机上需要以下要求。
python >= 2.6
cs >= 0.9.0
参数
参数 |
注释 |
---|---|
确保相应帐户的值。 |
|
用于查询 API 端点的 HTTP 方法。 如果未给定,则会考虑 选择
|
|
CloudStack API 的 API 密钥。 如果未给定,则会考虑 |
|
CloudStack API 的密钥。 如果未设置,则会考虑 |
|
HTTP 超时(以秒为单位)。 如果未给定,则会考虑 默认值: |
|
CloudStack API 的 URL,例如 https://cloud.example.com/client/api。 如果未给定,则会考虑 |
|
验证 CA 授权证书文件。 如果未给定,则会考虑 |
|
确保相应集群的值。 |
|
帐户所属的域。 仅当使用 account 时才考虑。 默认值: |
|
配置的名称。 |
|
确保相应存储池的值。 |
|
如果为 如果未给定,则会考虑 这应仅在个人控制的使用自签名证书的站点上使用。 选择
|
|
配置的值。 |
|
确保相应区域的值。 |
注释
注意
有关 cloudstack 模块的详细指南,请参阅 CloudStack 云指南。
此模块支持检查模式。
示例
- name: Ensure global configuration
ngine_io.cloudstack.cs_configuration:
name: router.reboot.when.outofband.migrated
value: false
- name: Ensure zone configuration
ngine_io.cloudstack.cs_configuration:
name: router.reboot.when.outofband.migrated
zone: ch-gva-01
value: true
- name: Ensure storage configuration
ngine_io.cloudstack.cs_configuration:
name: storage.overprovisioning.factor
storage: storage01
value: 2.0
- name: Ensure account configuration
ngine_io.cloudstack.cs_configuration:
name: allow.public.user.templates
value: false
account: acme inc
domain: customers
返回值
常见的返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
配置的帐户。 返回值: 成功 示例: |
|
配置的类别。 返回值: 成功 示例: |
|
配置的集群。 返回值: 成功 示例: |
|
配置的描述。 返回值: 成功 示例: |
|
配置帐户的域。 返回值: 成功 示例: |
|
配置的名称。 返回值: 成功 示例: |
|
需要更新的参数的范围(区域/集群/存储池/帐户)。 返回值: 成功 示例: |
|
配置的存储。 返回值: 成功 示例: |
|
配置的值。 返回值: 成功 示例: |
|
配置的区域。 返回值: 成功 示例: |