community.general.hwc_vpc_eip – Creates a resource of Vpc/EIP in Huawei Cloud¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.hwc_vpc_eip
.
New in version 0.2.0: of community.general
Requirements¶
The below requirements are needed on the host that executes this module.
keystoneauth1 >= 3.6.0
Parameters¶
Notes¶
Note
For authentication, you can set identity_endpoint using the
ANSIBLE_HWC_IDENTITY_ENDPOINT
env variable.For authentication, you can set user using the
ANSIBLE_HWC_USER
env variable.For authentication, you can set password using the
ANSIBLE_HWC_PASSWORD
env variable.For authentication, you can set domain using the
ANSIBLE_HWC_DOMAIN
env variable.For authentication, you can set project using the
ANSIBLE_HWC_PROJECT
env variable.For authentication, you can set region using the
ANSIBLE_HWC_REGION
env variable.Environment variables values will only be used if the playbook values are not set.
Examples¶
# create an eip and bind it to a port
- name: Create vpc
hwc_network_vpc:
cidr: "192.168.100.0/24"
name: "ansible_network_vpc_test"
register: vpc
- name: Create subnet
hwc_vpc_subnet:
gateway_ip: "192.168.100.32"
name: "ansible_network_subnet_test"
dhcp_enable: True
vpc_id: "{{ vpc.id }}"
cidr: "192.168.100.0/26"
register: subnet
- name: Create a port
hwc_vpc_port:
subnet_id: "{{ subnet.id }}"
ip_address: "192.168.100.33"
register: port
- name: Create an eip and bind it to a port
community.general.hwc_vpc_eip:
type: "5_bgp"
dedicated_bandwidth:
charge_mode: "traffic"
name: "ansible_test_dedicated_bandwidth"
size: 1
port_id: "{{ port.id }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei Inc. (@huaweicloud)