Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.hwc_vpc_route
.
New in version 0.2.0: of community.general
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
destination string / required | Specifies the destination IP address or CIDR block. | |
domain string / required | The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs). | |
id string | The id of resource to be managed. | |
identity_endpoint string / required | The Identity authentication URL. | |
next_hop string / required | Specifies the next hop. The value is VPC peering connection ID. | |
password string / required | The password to login with. | |
project string / required | The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs). | |
region string | The region to which the project belongs. | |
state string |
| Whether the given object should exist in Huawei Cloud. |
type string | Default: "peering" | Specifies the type of route. |
user string / required | The user name to login with (currently only user names are supported, and not user IDs). | |
vpc_id string / required | Specifies the VPC ID to which route is added. |
Note
ANSIBLE_HWC_IDENTITY_ENDPOINT
env variable.ANSIBLE_HWC_USER
env variable.ANSIBLE_HWC_PASSWORD
env variable.ANSIBLE_HWC_DOMAIN
env variable.ANSIBLE_HWC_PROJECT
env variable.ANSIBLE_HWC_REGION
env variable.# create a peering connect - name: Create a local vpc hwc_network_vpc: cidr: "192.168.0.0/16" name: "ansible_network_vpc_test_local" register: vpc1 - name: Create a peering vpc hwc_network_vpc: cidr: "192.168.0.0/16" name: "ansible_network_vpc_test_peering" register: vpc2 - name: Create a peering connect hwc_vpc_peering_connect: local_vpc_id: "{{ vpc1.id }}" name: "ansible_network_peering_test" filters: - "name" peering_vpc: vpc_id: "{{ vpc2.id }}" register: connect - name: Create a route community.general.hwc_vpc_route: vpc_id: "{{ vpc1.id }}" destination: "192.168.0.0/16" next_hop: "{{ connect.id }}"
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
destination string | success | Specifies the destination IP address or CIDR block. |
id string | success | UUID of the route. |
next_hop string | success | Specifies the next hop. The value is VPC peering connection ID. |
type string | success | Specifies the type of route. |
vpc_id string | success | Specifies the VPC ID to which route is added. |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/hwc_vpc_route_module.html