community.general.avi_cloud (0.1.1) — module

Module for setup of Cloud Avi RESTful Object

Authors: Gaurav Rastogi (@grastogi23) <grastogi@avinetworks.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module is used to configure Cloud object

more examples at U(https://github.com/avinetworks/devops)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Create a VMware cloud with write access mode
    avi_cloud:
      username: '{{ username }}'
      controller: '{{ controller }}'
      password: '{{ 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

Inputs

    
mtu:
    description:
    - Mtu setting for the cloud.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as 1500.

url:
    description:
    - Avi controller URL of the object.

name:
    description:
    - Name of the object.
    required: true

uuid:
    description:
    - Unique object identifier of the object.

state:
    choices:
    - absent
    - present
    default: present
    description:
    - The state that should be applied on the entity.

vtype:
    description:
    - 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, CLOUD_AZURE, CLOUD_GCP.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as CLOUD_NONE.
    required: true

tenant:
    default: admin
    description:
    - Name of tenant used for all Avi API calls and context of object.
    type: str

password:
    default: ''
    description:
    - Password of Avi user in Avi controller. The default value is the environment variable
      C(AVI_PASSWORD).
    type: str

username:
    default: ''
    description:
    - Username used for accessing Avi controller. The default value is the environment
      variable C(AVI_USERNAME).
    type: str

apic_mode:
    description:
    - Boolean flag to set apic_mode.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as False.
    type: bool

controller:
    default: ''
    description:
    - IP address or hostname of the controller. The default value is the environment variable
      C(AVI_CONTROLLER).
    type: str

tenant_ref:
    description:
    - It is a reference to an object of type tenant.

api_context:
    description:
    - Avi API context that includes current session ID and CSRF Token.
    - This allows user to perform single login and re-use the session.
    type: dict

api_version:
    default: 16.4.4
    description:
    - Avi API version of to use for Avi API and objects.
    type: str

custom_tags:
    description:
    - Custom tags for all avi created resources in the cloud infrastructure.
    - Field introduced in 17.1.5.

tenant_uuid:
    default: ''
    description:
    - UUID of tenant used for all Avi API calls and context of object.
    type: str

dhcp_enabled:
    description:
    - Select the ip address management scheme.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as False.
    type: bool

license_tier:
    description:
    - Specifies the default license tier which would be used by new se groups.
    - This field by default inherits the value from system configuration.
    - Enum options - ENTERPRISE_16, ENTERPRISE_18.
    - Field introduced in 17.2.5.

license_type:
    description:
    - 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, LIC_SE_BANDWIDTH,
      LIC_METERED_SE_BANDWIDTH.

avi_credentials:
    description:
    - Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller
      login details.
    suboptions:
      api_version:
        default: 16.4.4
        description:
        - Avi controller version
      controller:
        description:
        - Avi controller IP or SQDN
      csrftoken:
        description:
        - Avi controller API csrftoken to reuse existing session with session id
      password:
        description:
        - Avi controller password
      port:
        description:
        - Avi controller port
      session_id:
        description:
        - Avi controller API session id to reuse existing session with csrftoken
      tenant:
        default: admin
        description:
        - Avi controller tenant
      tenant_uuid:
        description:
        - Avi controller tenant UUID
      timeout:
        default: 300
        description:
        - Avi controller request timeout
      token:
        description:
        - Avi controller API token
      username:
        description:
        - Avi controller username
    type: dict

obj_name_prefix:
    description:
    - Default prefix for all automatically created objects in this cloud.
    - This prefix can be overridden by the se-group template.

avi_api_patch_op:
    choices:
    - add
    - replace
    - delete
    description:
    - Patch operation to use when using avi_api_update_method as patch.

dns_provider_ref:
    description:
    - Dns profile for the cloud.
    - It is a reference to an object of type ipamdnsproviderprofile.

aws_configuration:
    description:
    - Awsconfiguration settings for cloud.

gcp_configuration:
    description:
    - Google cloud platform configuration.
    - Field introduced in 18.2.1.

ipam_provider_ref:
    description:
    - Ipam profile for the cloud.
    - It is a reference to an object of type ipamdnsproviderprofile.

nsx_configuration:
    description:
    - Configuration parameters for nsx manager.
    - Field introduced in 17.1.1.

vca_configuration:
    description:
    - Vcloudairconfiguration settings for cloud.

apic_configuration:
    description:
    - Apicconfiguration settings for cloud.

azure_configuration:
    description:
    - Field introduced in 17.2.1.

ip6_autocfg_enabled:
    description:
    - Enable ipv6 auto configuration.
    - Field introduced in 18.1.1.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as False.
    type: bool

mesos_configuration:
    description:
    - Field deprecated in 18.2.2.

proxy_configuration:
    description:
    - Proxyconfiguration settings for cloud.

docker_configuration:
    description:
    - Dockerconfiguration settings for cloud.

prefer_static_routes:
    description:
    - 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.
    type: bool

avi_api_update_method:
    choices:
    - put
    - patch
    default: put
    description:
    - Default method for object update is HTTP PUT.
    - Setting to patch will override that behavior to use HTTP PATCH.

rancher_configuration:
    description:
    - Rancherconfiguration settings for cloud.

vcenter_configuration:
    description:
    - Vcenterconfiguration settings for cloud.

openstack_configuration:
    description:
    - Openstackconfiguration settings for cloud.

oshiftk8s_configuration:
    description:
    - Oshiftk8sconfiguration settings for cloud.

cloudstack_configuration:
    description:
    - Cloudstackconfiguration settings for cloud.

enable_vip_static_routes:
    description:
    - 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.
    type: bool

linuxserver_configuration:
    description:
    - Linuxserverconfiguration settings for cloud.

autoscale_polling_interval:
    description:
    - Cloudconnector polling interval for external autoscale groups.
    - Field introduced in 18.2.2.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as 60.

east_west_dns_provider_ref:
    description:
    - Dns profile for east-west services.
    - It is a reference to an object of type ipamdnsproviderprofile.

east_west_ipam_provider_ref:
    description:
    - 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.

state_based_dns_registration:
    description:
    - Dns records for vips are added/deleted based on the operational state of the vips.
    - Field introduced in 17.1.12.
    - Default value when not specified in API or module is interpreted by Avi Controller
      as True.
    type: bool

avi_disable_session_cache_as_fact:
    description:
    - It disables avi session information to be cached as a fact.
    type: bool

Outputs

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