Hwceco.Hwcollection¶
Collection version 1.0.5
Plugin Index¶
These are the plugins in the hwceco.hwcollection collection
Modules¶
hwc_cce_cluster – Creates a resource of cce cluster in Huawei Cloud
hwc_cce_node – Creates a resource of CCE/Node in Huawei Cloud
hwc_ecs_instance – Creates a resource of Ecs/Instance in Huawei Cloud
hwc_evs_disk – Creates a resource of Evs/Disk in Huawei Cloud
hwc_vpc – Creates a Huawei Cloud VPC
hwc_vpc_security_group – Creates a resource of Vpc/SecurityGroup in Huawei Cloud
hwc_vpc_security_group_rule – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud
hwc_vpc_subnet – Creates a resource of Vpc/Subnet in Huawei Cloud
See also
List of collections with docs hosted here.
hwceco.hwcollection.hwc_cce_cluster – Creates a resource of cce cluster in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_cce_cluster
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkcce >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create an cce cluster
- name: create a vpc
hwc_vpc:
cidr: "192.168.100.0/24"
name: "ansible_vpc_test"
register: vpc
- name: create a subnet
hwc_vpc_subnet:
filters:
- "name"
gateway_ip: "192.168.100.32"
name: "ansible_subnet_test"
dhcp_enable: true
vpc_id: "{{ vpc.state.id }}"
cidr: "192.168.100.0/26"
# dns is required for cce node installing
dns_address:
- "100.125.1.250"
- "100.125.21.250"
register: subnet
- name: create a cce cluster
hwc_cce_cluster:
filters:
- "name"
name: "ansible-cce-cluster-test"
description: "ansible cce cluster test"
flavor_id: "cce.s1.small"
vpc_id: "{{ vpc.state.id }}"
subnet_id: "{{ subnet.state.id }}"
container_network_type: "overlay_l2"
authentication_mode: "rbac"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_cce_node – Creates a resource of CCE/Node in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_cce_node
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkcce >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create an cce node instance
- name: create a vpc
hwc_vpc:
cidr: "192.168.100.0/24"
name: "ansible_vpc_test"
register: vpc
- name: create a subnet
hwc_vpc_subnet:
gateway_ip: "192.168.100.32"
name: "ansible_subnet_test"
dhcp_enable: true
vpc_id: "{{ vpc.state.id }}"
cidr: "192.168.100.0/26"
# dns is required for cce node installing
dns_address:
- "100.125.1.250"
- "100.125.21.250"
filters:
- "name"
register: subnet
- name: create a cce cluster
hwc_cce_cluster:
filters:
- "name"
name: "ansible-cce-cluster-test"
description: "ansible cce cluster test"
flavor_id: "cce.s1.small"
vpc_id: "{{ vpc.state.id }}"
subnet_id: "{{ subnet.state.id }}"
container_network_type: "overlay_l2"
authentication_mode: "rbac"
register: cluster
- name: create a cce node
hwc_cce_node:
filters:
- "name"
name: "ansible-cce-node-test"
cluster_id: "{{ cluster.state.id }}"
flavor_id: "s6.large.2"
availability_zone: "cn-north-4a"
subnet_id: "{{ subnet.state.id }}"
key_pair: "test-key-pair"
root_volume:
size: 40
volume_type: "SAS"
data_volumes:
- size: 100
volume_type: "SAS"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_ecs_instance – Creates a resource of Ecs/Instance in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_ecs_instance
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkecs >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create an ecs instance
- name: create a vpc
hwc_network_vpc:
cidr: "192.168.100.0/24"
name: "ansible_network_vpc_test"
register: vpc
- name: create a subnet
hwc_vpc_subnet:
gateway_ip: "192.168.100.32"
name: "ansible_network_subnet_test"
dhcp_enable: true
vpc_id: "{{ vpc.state.id }}"
filters:
- "name"
cidr: "192.168.100.0/26"
register: subnet
- name: create a eip
hwc_vpc_eip:
dedicated_bandwidth:
charge_mode: "traffic"
name: "ansible_test_dedicated_bandwidth"
size: 1
type: "5_bgp"
filters:
- "type"
- "dedicated_bandwidth"
register: eip
- name: create a disk
hwc_evs_disk:
filters:
- "name"
availability_zone: "cn-north-1a"
name: "ansible_evs_disk_test"
volume_type: "SATA"
size: 10
register: disk
- name: create an instance
hwc_ecs_instance:
data_volumes:
- volume_id: "{{ disk.state.id }}"
eip_id: "{{ eip.state.id }}"
name: "ansible_ecs_instance_test"
availability_zone: "cn-north-1a"
nics:
- subnet_id: "{{ subnet.state.id }}"
ip_address: "192.168.100.33"
- subnet_id: "{{ subnet.state.id }}"
ip_address: "192.168.100.34"
server_tags:
my_server: "my_server"
image_id: "8da46d6d-6079-4e31-ad6d-a7167efff892"
flavor_name: "s3.small.1"
filters:
- "name"
vpc_id: "{{ vpc.state.id }}"
root_volume:
volume_type: "SAS"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_evs_disk – Creates a resource of Evs/Disk in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_evs_disk
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkevs >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# test create disk
- name: create a disk
hwc_evs_disk:
filters:
- "name"
availability_zone: "cn-north-1a"
name: "ansible_evs_disk_test"
volume_type: "SATA"
size: 10
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_vpc – Creates a Huawei Cloud VPC¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_vpc
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkvpc >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_vpc_security_group – Creates a resource of Vpc/SecurityGroup in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_vpc_security_group
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkvpc >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create a security group
- name: create a security group
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
filters:
- "name"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_vpc_security_group_rule – Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_vpc_security_group_rule
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkvpc >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create a security group rule
- name: create a security group
hwc_vpc_security_group:
name: "ansible_network_security_group_test"
filters:
- "name"
register: sg
- name: create a security group rule
hwc_vpc_security_group_rule:
direction: "ingress"
protocol: "tcp"
ethertype: "IPv4"
port_range_max: 22
security_group_id: "{{ sg.state.id }}"
port_range_min: 22
filters:
- "security_group_id"
remote_ip_prefix: "0.0.0.0/0"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)
hwceco.hwcollection.hwc_vpc_subnet – Creates a resource of Vpc/Subnet in Huawei Cloud¶
Note
This plugin is part of the hwceco.hwcollection collection (version 1.0.5).
To install it use: ansible-galaxy collection install hwceco.hwcollection
.
To use it in a playbook, specify: hwceco.hwcollection.hwc_vpc_subnet
.
New in version 1.0.0: of hwceco.hwcollection
Requirements¶
The below requirements are needed on the host that executes this module.
huaweicloudsdkcore >= 3.0.47
huaweicloudsdkvpc >= 3.0.47
Parameters¶
Notes¶
Note
For authentication, you can set access_key using the `ANSIBLE_HWC_ACCESS_KEY’ env variable.
For authentication, you can set secret_key using the `ANSIBLE_HWC_SECRET_KEY’ env variable.
For authentication, you can set project_id using the `ANSIBLE_HWC_PROJECT_ID’ env variable.
For authentication, you can set region using the `ANSIBLE_HWC_REGION’ env variable.
For authentication, you can set identity_endpoint using the `ANSIBLE_HWC_IDENTITY_ENDPOINT’ env variable.
For authentication, you can set cloud using the `ANSIBLE_HWC_CLOUD’ env variable.
Environment variables values will only be used if the playbook values are not set.
Examples¶
# create subnet
- name: create vpc
hwc_vpc:
cidr: "192.168.100.0/24"
name: "ansible_network_vpc_test"
register: vpc
- name: create subnet
hwc_vpc_subnet:
filters:
- "name"
vpc_id: "{{ vpc.state.id }}"
cidr: "192.168.100.0/26"
gateway_ip: "192.168.100.32"
name: "ansible_network_subnet_test"
dhcp_enable: True
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Huawei (@huaweicloud)