Note
This plugin is part of the opentelekomcloud.cloud collection (version 0.0.1).
To install it use: ansible-galaxy collection install opentelekomcloud.cloud
.
To use it in a playbook, specify: opentelekomcloud.cloud.cce_node_pool
.
New in version 0.5.0: of opentelekomcloud.cloud
The below requirements are needed on the host that executes this module.
openstacksdk
openstacksdk >= 0.36.0
otcextensions
python >= 3.6
Note
The standard OpenStack environment variables, such as OS_USERNAME
may be used instead of providing explicit values.
Auth information is driven by openstacksdk, which means that values can come from a yaml config file in /etc/ansible/openstack.yaml, /etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml, then from standard environment variables, then finally by explicit parameters in plays. More information can be found at https://docs.openstack.org/openstacksdk/
# Create CCE Node Pool with minimal configuration
- cce_node_pool:
cloud: "{{ test_cloud }}"
cluster: clustername
flavor: s2.large.2
os: 'CentOS 7.7'
name: my-nodepool
network_id: '25d24fc8-d019-4a34-9fff-0a09fde6a123'
ssh_key: 'ssh-pub'
state: present
register: pool
# Create CCE Node Pool with fine-grained configuration
- cce_node_pool:
cloud: "{{ test_cloud }}"
availability_zone: "random"
autoscaling_enabled: True
cluster: tino-test
data_volumes:
- volumetype: SSD
size: 120
- volumetype: SATA
size: 100
encrypted: False
cmk_id: ''
flavor: s2.large.2
initial_node_count: 0
k8s_tags:
mytag: myvalue
mysecondtag: mysecondvalue
min_node_count: 1
max_node_count: 3
name: test-ansible2
network_id: '25d24fc8-d019-4a34-9fff-0a09fde6a123'
priority: 2
os: 'CentOS 7.7'
scale_down_cooldown_time: 5
ssh_key: 'sshkey-pub'
tags:
- key: 'my_first_key'
value: 'my_first_value'
- key: 'my_second_key'
value: 'my_secound_value'
taints:
- key: 'first_taint_key'
value: 'first_taint_value'
effect: 'NoSchedule'
- key: 'second_taint_key'
value: 'secound_taint_value'
effect: 'NoExecute'
state: present
register: pool
# Delete CCE Node Pool
- opentelekomcloud.cloud.cce_node_pool:
cluster: "{{ cluster_name_or_id }}"
name: "{{ cce_node_pool_name_or_id }}"
state: absent
Common return values are documented here, the following are the fields unique to this module:
Tino Schreiber (@tischrei)