ngine_io.cloudstack.cs_vpc_offering 模块 – 管理基于 Apache CloudStack 的云上的 VPC 产品。
注意
此模块是 ngine_io.cloudstack 集合(版本 2.5.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install ngine_io.cloudstack。您需要进一步的要求才能使用此模块,请参阅 要求 了解详情。
要在剧本中使用它,请指定: ngine_io.cloudstack.cs_vpc_offering。
ngine_io.cloudstack 0.1.0 中的新增功能
概要
- 创建、更新、启用、禁用和删除 CloudStack VPC 产品。 
要求
执行此模块的主机需要以下要求。
- 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 授权证书文件。 如果未给出,则考虑  | |
| VPC 产品的显示文本 | |
| VPC 产品的名称 | |
| 轮询异步作业,直到作业完成。 选项 
 | |
| 作为 VPC 产品一部分的所需服务功能。 | |
| VPC 路由器设备的服务的名称或 ID。 | |
| 提供商到服务的映射。如果未指定,则该服务的提供商将映射到物理网络上的默认提供商 | |
| VPC 产品的状态。 选项 
 | |
| VPC 产品支持的服务 | |
| 如果  如果未给出,则考虑  这应该仅在个人控制的使用自签名证书的站点上使用。 选项 
 | 
说明
注意
- 有关 cloudstack 模块的详细指南,请参阅 CloudStack 云指南。 
- 此模块支持检查模式。 
示例
- name: Create a vpc offering and enable it
  ngine_io.cloudstack.cs_vpc_offering:
    name: my_vpc_offering
    display_text: vpc offering description
    state: enabled
    supported_services: [ Dns, Dhcp ]
    service_providers:
      - {service: 'dns', provider: 'VpcVirtualRouter'}
      - {service: 'dhcp', provider: 'VpcVirtualRouter'}
- name: Create a vpc offering with redundant router
  ngine_io.cloudstack.cs_vpc_offering:
    name: my_vpc_offering
    display_text: vpc offering description
    supported_services: [ Dns, Dhcp, SourceNat ]
    service_providers:
      - {service: 'dns', provider: 'VpcVirtualRouter'}
      - {service: 'dhcp', provider: 'VpcVirtualRouter'}
      - {service: 'SourceNat', provider: 'VpcVirtualRouter'}
    service_capabilities:
      - {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true}
- name: Create a region level vpc offering with distributed router
  ngine_io.cloudstack.cs_vpc_offering:
    name: my_vpc_offering
    display_text: vpc offering description
    state: present
    supported_services: [ Dns, Dhcp, SourceNat ]
    service_providers:
      - {service: 'dns', provider: 'VpcVirtualRouter'}
      - {service: 'dhcp', provider: 'VpcVirtualRouter'}
      - {service: 'SourceNat', provider: 'VpcVirtualRouter'}
    service_capabilities:
      - {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true}
      - {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true}
- name: Remove a vpc offering
  ngine_io.cloudstack.cs_vpc_offering:
    name: my_vpc_offering
    state: absent
返回值
常见的返回值记录在此处,以下是此模块独有的字段
| 键 | 描述 | 
|---|---|
| VPC 产品的显示文本 已返回: 成功 示例:  | |
| 指示 VPC 产品是否支持用于单跳转发的分布式路由器。 已返回: 成功 示例:  | |
| VPC 产品的 UUID。 已返回: 成功 示例:  | |
| VPC 产品是否为默认产品。 已返回: 成功 示例:  | |
| VPC 产品的名称 已返回: 成功 示例:  | |
| 指示产品是否可以支持区域级 VPC。 已返回: 成功 示例:  | |
| 服务产品的 ID。 已返回: 成功 示例:  | |
| VPC 产品的状态 已返回: 成功 示例:  | 
