W3cubDocs

/Ansible

avi_cloud - Module for setup of Cloud Avi RESTful Object

New in version 2.4.

Synopsis

Requirements (on host that executes module)

  • avisdk

Options

parameter required default choices comments
api_version
no
Avi API version of to use for Avi API and objects.
apic_configuration
no
Apicconfiguration settings for cloud.
apic_mode
no
Boolean flag to set apic_mode.
Default value when not specified in API or module is interpreted by Avi Controller as False.
aws_configuration
no
Awsconfiguration settings for cloud.
cloudstack_configuration
no
Cloudstackconfiguration settings for cloud.
controller
no
IP address or hostname of the controller. The default value is the environment variable AVI_CONTROLLER.
dhcp_enabled
no
Select the ip address management scheme.
Default value when not specified in API or module is interpreted by Avi Controller as False.
dns_provider_ref
no
Dns profile for the cloud.
It is a reference to an object of type ipamdnsproviderprofile.
docker_configuration
no
Dockerconfiguration settings for cloud.
east_west_dns_provider_ref
no
Dns profile for east-west services.
It is a reference to an object of type ipamdnsproviderprofile.
east_west_ipam_provider_ref
no
Ipam profile for east-west services.
Warning - please use virtual subnets in this ipam profile that do not conflict with the underlay networks or any overlay networks in the cluster.
For example in aws and gcp, 169.254.0.0/16 is used for storing instance metadata.
Hence, it should not be used in this profile.
It is a reference to an object of type ipamdnsproviderprofile.
enable_vip_static_routes
no
Use static routes for vip side network resolution during virtualservice placement.
Default value when not specified in API or module is interpreted by Avi Controller as False.
ipam_provider_ref
no
Ipam profile for the cloud.
It is a reference to an object of type ipamdnsproviderprofile.
license_type
no
If no license type is specified then default license enforcement for the cloud type is chosen.
The default mappings are container cloud is max ses, openstack and vmware is cores and linux it is sockets.
Enum options - LIC_BACKEND_SERVERS, LIC_SOCKETS, LIC_CORES, LIC_HOSTS.
linuxserver_configuration
no
Linuxserverconfiguration settings for cloud.
mesos_configuration
no
Mesosconfiguration settings for cloud.
mtu
no
Mtu setting for the cloud.
Default value when not specified in API or module is interpreted by Avi Controller as 1500.
name
yes
Name of the object.
nsx_configuration
no
Configuration parameters for nsx manager.
Field introduced in 17.1.1.
obj_name_prefix
no
Default prefix for all automatically created objects in this cloud.
This prefix can be overridden by the se-group template.
openstack_configuration
no
Openstackconfiguration settings for cloud.
oshiftk8s_configuration
no
Oshiftk8sconfiguration settings for cloud.
password
no
Password of Avi user in Avi controller. The default value is the environment variable AVI_PASSWORD.
prefer_static_routes
no
Prefer static routes over interface routes during virtualservice placement.
Default value when not specified in API or module is interpreted by Avi Controller as False.
proxy_configuration
no
Proxyconfiguration settings for cloud.
rancher_configuration
no
Rancherconfiguration settings for cloud.
state
no present
  • absent
  • present
The state that should be applied on the entity.
tenant
no admin
Name of tenant used for all Avi API calls and context of object.
tenant_ref
no
It is a reference to an object of type tenant.
tenant_uuid
no
UUID of tenant used for all Avi API calls and context of object.
url
no
Avi controller URL of the object.
username
no
Username used for accessing Avi controller. The default value is the environment variable AVI_USERNAME.
uuid
no
Unique object identifier of the object.
vca_configuration
no
Vcloudairconfiguration settings for cloud.
vcenter_configuration
no
Vcenterconfiguration settings for cloud.
vtype
yes
Cloud type.
Enum options - CLOUD_NONE, CLOUD_VCENTER, CLOUD_OPENSTACK, CLOUD_AWS, CLOUD_VCA, CLOUD_APIC, CLOUD_MESOS, CLOUD_LINUXSERVER, CLOUD_DOCKER_UCP,
CLOUD_RANCHER, CLOUD_OSHIFT_K8S.
Default value when not specified in API or module is interpreted by Avi Controller as CLOUD_NONE.

Examples

- name: Create a VMware cloud with write access mode
  avi_cloud:
    username: ''
    controller: ''
    password: ''
    apic_mode: false
    dhcp_enabled: true
    enable_vip_static_routes: false
    license_type: LIC_CORES
    mtu: 1500
    name: VCenter Cloud
    prefer_static_routes: false
    tenant_ref: admin
    vcenter_configuration:
      datacenter_ref: /api/vimgrdcruntime/datacenter-2-10.10.20.100
      management_network: /api/vimgrnwruntime/dvportgroup-103-10.10.20.100
      password: password
      privilege: WRITE_ACCESS
      username: user
      vcenter_url: 10.10.20.100
    vtype: CLOUD_VCENTER

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
obj
Cloud (api/cloud) object
success, changed dict

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/avi_cloud_module.html