Skip to content

VMware Advanced Load Balancer (formerly Avi) Ansible Collection

License

Notifications You must be signed in to change notification settings

vmware/ansible-collection-alb

Repository files navigation

Advanced Load Balancer (formerly Avi) Ansible Collection

Apache licensed Collection CI

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10.

Python Support

  • Collection supports >= 3.5

Installation and Usage

Ansible must be installed

pip install ansible

Install ALB collection using ansible-galaxy CLI:

ansible-galaxy collection install vmware.alb

Install ALB collection using requirements.yml file:

Create requirements.yml file using below contents

collections:
- name: vmware.alb

Install the collection:

ansible-galaxy collection install -r requirements.yml

Required Python libraries

ALB collection depends upon following third party libraries:

How to install ovftool

cd /home/user/downloads
chmod 755 VMware-ovftool-4.4.0-15722219-lin.x86_64.bundle
sudo ./VMware-ovftool-4.4.0-15722219-lin.x86_64.bundle

Installing required libraries

After ALB collection installation we need to install the required python libraries using following command:

pip install -r ~/.ansible/collections/ansible_collections/vmware/alb/requirements.txt

Modules

Name Description
vmware.alb.avi_actiongroupconfig Module to create update or delete ActionGroupConfig
vmware.alb.avi_albservicesconfig Module to create update or delete ALBServicesConfig
vmware.alb.avi_albservicesfiledownload Module to create update or delete ALBServicesFileDownload
vmware.alb.avi_albservicesfileupload Module to create update or delete ALBServicesFileUpload
vmware.alb.avi_albservicesjob Module to create update or delete ALBServicesJob
vmware.alb.avi_alertconfig Module to create update or delete AlertConfig
vmware.alb.avi_alertemailconfig Module to create update or delete AlertEmailConfig
vmware.alb.avi_alertscriptconfig Module to create update or delete AlertScriptConfig
vmware.alb.avi_alertsyslogconfig Module to create update or delete AlertSyslogConfig
vmware.alb.avi_analyticsprofile Module to create update or delete AnalyticsProfile
vmware.alb.avi_api_fileservice Module to create update or delete ApiFileservice
vmware.alb.avi_api_image Module to create update or delete ApiImage
vmware.alb.avi_api_session Module to create update or delete ApiSession
vmware.alb.avi_api_version Module to create update or delete ApiVersion
vmware.alb.avi_applicationpersistenceprofile Module to create update or delete ApplicationPersistenceProfile
vmware.alb.avi_applicationprofile Module to create update or delete ApplicationProfile
vmware.alb.avi_authmappingprofile Module to create update or delete AuthMappingProfile
vmware.alb.avi_authprofile Module to create update or delete AuthProfile
vmware.alb.avi_autoscalelaunchconfig Module to create update or delete AutoScaleLaunchConfig
vmware.alb.avi_availabilityzone Module to create update or delete AvailabilityZone
vmware.alb.avi_backup Module to create update or delete Backup
vmware.alb.avi_backupconfiguration Module to create update or delete BackupConfiguration
vmware.alb.avi_bootstrap_controller Module to create update or delete BootstrapController
vmware.alb.avi_botconfigconsolidator Module to create update or delete BotConfigConsolidator
vmware.alb.avi_botdetectionpolicy Module to create update or delete BotDetectionPolicy
vmware.alb.avi_botipreputationtypemapping Module to create update or delete BotIPReputationTypeMapping
vmware.alb.avi_botmapping Module to create update or delete BotMapping
vmware.alb.avi_certificatemanagementprofile Module to create update or delete CertificateManagementProfile
vmware.alb.avi_cloud Module to create update or delete Cloud
vmware.alb.avi_cloudconnectoruser Module to create update or delete CloudConnectorUser
vmware.alb.avi_cloudproperties Module to create update or delete CloudProperties
vmware.alb.avi_cluster Module to create update or delete Cluster
vmware.alb.avi_clusterclouddetails Module to create update or delete ClusterCloudDetails
vmware.alb.avi_controllerportalregistration Module to create update or delete ControllerPortalRegistration
vmware.alb.avi_controllerproperties Module to create update or delete ControllerProperties
vmware.alb.avi_controllersite Module to create update or delete ControllerSite
vmware.alb.avi_csrfpolicy Module to create update or delete CSRFPolicy
vmware.alb.avi_customipamdnsprofile Module to create update or delete CustomIpamDnsProfile
vmware.alb.avi_deploy_controller Module to create update or delete DeployController
vmware.alb.avi_dnspolicy Module to create update or delete DnsPolicy
vmware.alb.avi_dynamicdnsrecord Module to create update or delete DynamicDnsRecord
vmware.alb.avi_errorpagebody Module to create update or delete ErrorPageBody
vmware.alb.avi_errorpageprofile Module to create update or delete ErrorPageProfile
vmware.alb.avi_federationcheckpoint Module to create update or delete FederationCheckpoint
vmware.alb.avi_fileobject Module to create update or delete FileObject
vmware.alb.avi_geodb Module to create update or delete GeoDB
vmware.alb.avi_gslb Module to create update or delete Gslb
vmware.alb.avi_gslbgeodbprofile Module to create update or delete GslbGeoDbProfile
vmware.alb.avi_gslbservice Module to create update or delete GslbService
vmware.alb.avi_gslbservice_patch_member Module to create update or delete GslbservicePatchMember
vmware.alb.avi_hardwaresecuritymodulegroup Module to create update or delete HardwareSecurityModuleGroup
vmware.alb.avi_healthmonitor Module to create update or delete HealthMonitor
vmware.alb.avi_httppolicyset Module to create update or delete HTTPPolicySet
vmware.alb.avi_icapprofile Module to create update or delete IcapProfile
vmware.alb.avi_image Module to create update or delete Image
vmware.alb.avi_inventoryfaultconfig Module to create update or delete InventoryFaultConfig
vmware.alb.avi_ipaddrgroup Module to create update or delete IpAddrGroup
vmware.alb.avi_ipamdnsproviderprofile Module to create update or delete IpamDnsProviderProfile
vmware.alb.avi_ipreputationdb Module to create update or delete IPReputationDB
vmware.alb.avi_jwtserverprofile Module to create update or delete JWTServerProfile
vmware.alb.avi_l4policyset Module to create update or delete L4PolicySet
vmware.alb.avi_labelgroup Module to create update or delete LabelGroup
vmware.alb.avi_licenseledgerdetails Module to create update or delete LicenseLedgerDetails
vmware.alb.avi_licensestatus Module to create update or delete LicenseStatus
vmware.alb.avi_memorybalancerrequest Module to create update or delete MemoryBalancerRequest
vmware.alb.avi_microservicegroup Module to create update or delete MicroServiceGroup
vmware.alb.avi_natpolicy Module to create update or delete NatPolicy
vmware.alb.avi_network Module to create update or delete Network
vmware.alb.avi_networkprofile Module to create update or delete NetworkProfile
vmware.alb.avi_networksecuritypolicy Module to create update or delete NetworkSecurityPolicy
vmware.alb.avi_networkservice Module to create update or delete NetworkService
vmware.alb.avi_nsxtsegmentruntime Module to create update or delete NsxtSegmentRuntime
vmware.alb.avi_pkiprofile Module to create update or delete PKIProfile
vmware.alb.avi_pool Module to create update or delete Pool
vmware.alb.avi_poolgroup Module to create update or delete PoolGroup
vmware.alb.avi_poolgroupdeploymentpolicy Module to create update or delete PoolGroupDeploymentPolicy
vmware.alb.avi_prioritylabels Module to create update or delete PriorityLabels
vmware.alb.avi_protocolparser Module to create update or delete ProtocolParser
vmware.alb.avi_pulse_registration Module to create update or delete PulseRegistration
vmware.alb.avi_role Module to create update or delete Role
vmware.alb.avi_saml_api_session Module to create update or delete SamlApiSession
vmware.alb.avi_scheduler Module to create update or delete Scheduler
vmware.alb.avi_securitymanagerdata Module to create update or delete SecurityManagerData
vmware.alb.avi_securitypolicy Module to create update or delete SecurityPolicy
vmware.alb.avi_seproperties Module to create update or delete SeProperties
vmware.alb.avi_serverautoscalepolicy Module to create update or delete ServerAutoScalePolicy
vmware.alb.avi_serviceauthprofile Module to create update or delete ServiceAuthProfile
vmware.alb.avi_serviceengine Module to create update or delete ServiceEngine
vmware.alb.avi_serviceenginegroup Module to create update or delete Serviceenginegroup
vmware.alb.avi_serviceenginegroup Module to create update or delete ServiceEngineGroup
vmware.alb.avi_serviceenginegroup_advanced Module to create update or delete ServiceenginegroupAdvanced
vmware.alb.avi_siteversion Module to create update or delete SiteVersion
vmware.alb.avi_snmptrapprofile Module to create update or delete SnmpTrapProfile
vmware.alb.avi_sslkeyandcertificate Module to create update or delete SSLKeyAndCertificate
vmware.alb.avi_sslprofile Module to create update or delete SSLProfile
vmware.alb.avi_ssopolicy Module to create update or delete SSOPolicy
vmware.alb.avi_statediffoperation Module to create update or delete StatediffOperation
vmware.alb.avi_statediffsnapshot Module to create update or delete StatediffSnapshot
vmware.alb.avi_stringgroup Module to create update or delete StringGroup
vmware.alb.avi_systemconfiguration Module to create update or delete SystemConfiguration
vmware.alb.avi_systemlimits Module to create update or delete SystemLimits
vmware.alb.avi_systemreport Module to create update or delete SystemReport
vmware.alb.avi_tenant Module to create update or delete Tenant
vmware.alb.avi_tenantsystemconfiguration Module to create update or delete TenantSystemConfiguration
vmware.alb.avi_testsedatastorelevel1 Module to create update or delete TestSeDatastoreLevel1
vmware.alb.avi_testsedatastorelevel2 Module to create update or delete TestSeDatastoreLevel2
vmware.alb.avi_testsedatastorelevel3 Module to create update or delete TestSeDatastoreLevel3
vmware.alb.avi_trafficcloneprofile Module to create update or delete TrafficCloneProfile
vmware.alb.avi_update_se_data_vnics Module to create update or delete UpdateSeDataVnics
vmware.alb.avi_upgradestatusinfo Module to create update or delete UpgradeStatusInfo
vmware.alb.avi_upgradestatussummary Module to create update or delete UpgradeStatusSummary
vmware.alb.avi_user Module to create update or delete User
vmware.alb.avi_useraccount Module to create update or delete Useraccount
vmware.alb.avi_useraccountprofile Module to create update or delete UserAccountProfile
vmware.alb.avi_vcenterserver Module to create update or delete VCenterServer
vmware.alb.avi_virtualservice Module to create update or delete VirtualService
vmware.alb.avi_vrfcontext Module to create update or delete VrfContext
vmware.alb.avi_vsdatascriptset Module to create update or delete VSDataScriptSet
vmware.alb.avi_vsgs Module to create update or delete VsGs
vmware.alb.avi_vsvip Module to create update or delete VsVip
vmware.alb.avi_wafapplicationsignatureprovider Module to create update or delete WafApplicationSignatureProvider
vmware.alb.avi_wafpolicy Module to create update or delete WafPolicy
vmware.alb.avi_wafpolicypsmgroup Module to create update or delete WafPolicyPSMGroup
vmware.alb.avi_wafprofile Module to create update or delete WafProfile
vmware.alb.avi_webapput Module to create update or delete WebappUT
vmware.alb.avi_webhook Module to create update or delete Webhook

Testing with ansible-test

Refer testing for more information.

Publishing New Version

Examples

- hosts: localhost
  connection: local
  collections:
    - vmware.alb
  tasks:
    - name: Example to create a Pool object
      avi_pool:
        avi_credentials:
          username: "admin"
          password: "something"
          controller: "192.168.15.18"
          api_version: "21.1.1"
        name: app1-pool
        lb_algorithm: LB_ALGORITHM_LEAST_LOAD
        servers:
        - ip:
             addr: "192.168.12.15"
             type: 'V4'

Example usage of external credentials/variable file while using alb module

# creds.yml
avi_credentials:
    controller: "192.168.1.11"
    username: "admin"
    password: "password"
    api_version: 20.1.5
# example.yml
- hosts: localhost
  connection: local
  collections:
    - vmware.alb
  vars_files:
    - creds.yml
  tasks:
    - name: Example to create a Pool object
      avi_pool:
        avi_credentials: "{{ avi_credentials |  default(omit) }}"
        name: app1-pool
        lb_algorithm: LB_ALGORITHM_LEAST_LOAD
        servers:
        - ip:
             addr: "192.168.12.15"
             type: 'V4'

Example for using aviconfig role:

# config.yml
avi_config:
  pool:
    - name: role1-pool
      lb_algorithm: LB_ALGORITHM_LEAST_LOAD
      servers:
        - ip:
             addr: 192.160.1.10
             type: 'V4'
# collection.yml
- hosts: localhost
  connection: local
  collections:
    - vmware.alb
  tasks:
    - name: Create pool using aviconfig role
      import_role:
        name: aviconfig
      vars:
          avi_config_file: "config.yml"
          avi_creds_file: "creds.yml"
          # avi_creds_file parameter is only valid for aviconfig role.
          # For importing credentials from external file in modules,
          # please use vars_files parameter as shown in previous example

Notes Please use Python >= 3.8 if you are using avi_serviceenginegroup module as it has more than 255 arguments

About

VMware Advanced Load Balancer (formerly Avi) Ansible Collection

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages