vCD Edge Gateway - vmware-archive/ansible-module-vcloud-director GitHub Wiki

Edge Gateway Example Usage

  1. Edge Gateway States

    • Create Edge Gateway
    
    - name: create edge gateway
       vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        gateway_backing_config: compact
        external_networks:
          - external-network
        state: present
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • external_networks - (Required) list of external network's name to which gateway can connect
    • ogateway_backing_config - (Required) gateway backing config. Possible values can be compact/full/full4/x-large
    • description - (Optional) description of the new gateway
    • is_default_gateway - (Optional) should the new gateway be configured as the default gateway. default value is False
    • selected_extnw_for_default_gw - (Optional) selected external network for default gateway.
    • default_gateway_ip - (Optional) selected dafault gateway IP
    • is_default_gw_for_dns_relay_selected - (Optional) is default gateway for dns relay selected. default value is False
    • is_ha_enabled - (Optional) is HA enabled. default value is False
    • should_create_as_advanced - (Optional) should_create_as_advanced. default value is False
    • is_dr_enabled - (Optional) is_dr_enabled. default value is False
    • is_ip_settings_configured - (Optional) is ip settings configured. default value is False
    • ext_net_to_participated_subnet_with_ip_settings - (Optional) external network to subnet ip with ip assigned in case of manual else Auto e.g., {"ext_net' : {'10.3.2.1/24' : Auto/10.3.2.2}}
    • is_sub_allocate_ip_pools_enabled - (Optional) is sub allocate ip pools enabled. default value is False
    • ext_net_to_subnet_with_ip_range - (Optional) external network to sub allocated ip with ip ranges e.g., {'ext_net' : {'10.3.2.1/24' : [ '10.3.2.2-10.3.2.5', '10.3.2.12-10.3.2.15']}}
    • ext_net_to_rate_limit - (Optional) external network to rate limit e.g., {'ext_net' : {100 : 100}}
    • is_flips_mode_enabled - (Optional) is_flips_mode_enabled. default value is False
    • edgeGatewayType - (Optional) edge gateway type. possible values will be NSXV_BACKED/NSXT_BACKED/NSXT_IMPORTED
    • state == "present" (Required) to create edge gateway

    • Update Edge Gateway
    
    - name: update edge gateway
      vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        new_gateway_name: test-gateway-01
        ha_enabled: true
        state: update
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • new_gateway_name - (Optional) new name of the gateway
    • ha_enabled - (Optional) is ha enabled for the gateway. default value is None
    • description - (Optional) description of the new gateway
    • state == "update" (Required) to update edge gateway

    • Delete Edge Gateway
    
    - name: delete edge gateway
      vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        state: absent
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • state == "absent" (Required) to delete edge gateway

  2. Edge Gateway Operations

    • Update Subnet IP Pool
    
    - name: update subnet ip pools
      vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        ext_net_subnet_allocated_ip_pool:
          external-network: 10.176.3.20-10.176.3.25
        operation: update_ip_pool
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • ext_net_subnet_allocated_ip_pool - (Required) updated subnet ip ranges for the external network
    • operation == "update_ip_pool" (Required) to update the subnet ip pool attached with the external network of a edge gateway

    • Add External Network
    
    - name: add external network
      vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        ext_net_to_participated_subnet_with_ip_settings:
          external-network:
            172.17.11.1/24: 172.17.11.102
        operation: add_network
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • ext_net_to_participated_subnet_with_ip_settings - (Required) - external network to subnet ip with ip assigned in case of manual else Auto e.g., {"ext_net' : {'10.3.2.1/24' : Auto/10.3.2.2}}
    • operation == "add_network" (Required) to add a new external network to edge gateway

    • Remove External Network
    
    - name: remove external network
      vcd_vdc_gateway:
        org_name: Acme
        vdc_name: ACME_PAYG
        gateway_name: test-gateway
        external_networks:
          - external-network
        operation: remove_network
    
    
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • org_name - (Required) name of the organization
    • vdc_name - (Required) name of the vdc
    • gateway_name - (Required) name of the edge gateway
    • external_networks - (Required) list of external networks to be removed
    • operation == "remove_network" (Required) to remove an external network from edge gateway
⚠️ **GitHub.com Fallback** ⚠️