opentelekomcloud.cloud.as_config module -- Create/Remove AutoScaling configuration from the OTC¶
Note
This module is part of the opentelekomcloud.cloud collection (version 0.14.6).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install opentelekomcloud.cloud
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: opentelekomcloud.cloud.as_config
.
New in opentelekomcloud.cloud 0.2.0
Synopsis¶
Create/Remove AutoScaling configuration from the OTC.
Requirements¶
The below requirements are needed on the host that executes this module.
openstacksdk
openstacksdk >= 0.36.0
otcextensions
python >= 3.6
Parameters¶
Parameter |
Comments |
---|---|
How long should the socket layer wait before timing out for API calls. If this is omitted, nothing will be passed to the requests library. |
|
Dictionary containing auth information as needed by the cloud's auth plugin strategy. For the default password plugin, this would contain auth_url, username, password, project_name and any information about domains (for example, os_user_domain_name or os_project_domain_name) if the cloud supports them. For other plugins, this param will need to contain whatever parameters that auth plugin requires. This parameter is not needed if a named cloud is provided or OpenStack OS_* environment variables are present. |
|
Name of the auth plugin to use. If the cloud uses something other than password authentication, the name of the plugin should be indicated here and the contents of the auth parameter should be updated accordingly. |
|
A path to a CA Cert bundle that can be used as part of verifying SSL API requests. |
|
A path to a client certificate to use as part of the SSL transaction. |
|
A path to a client key to use as part of the SSL transaction. |
|
Named cloud or cloud config to operate against. If cloud is a string, it references a named cloud config as defined in an OpenStack clouds.yaml file. Provides default values for auth and auth_type. This parameter is not needed if auth is provided or if OpenStack OS_* environment variables are present. If cloud is a dict, it contains a complete cloud configuration like would be in a section of clouds.yaml. |
|
Specifies the disk group information. System disks are mandatory and data disks are optional. |
|
Specifies the ID of a data disk image used to export data disks of an ECS. |
|
Specifies a DSS device ID for creating an ECS disk. |
|
Specifies a disk type. Mandatory. Choices:
|
|
Specifies the metadata for creating disks. |
|
Specifies the CMK ID, which indicates encryption in metadata. This parameter is used with __system__encrypted. |
|
Specifies encryption in metadata. The value can be 0 (encryption disabled) or 1 (encryption enabled). Choices:
|
|
Specifies the disk size. The unit is GB. Mandatory. |
|
Specifies the disk backup snapshot ID for restoring the system disk and data disks using a full-ECS backup when a full-ECS image is used. |
|
Specifies the ECS system disk type. Mandatory. Choices:
|
|
Specifies the ECS flavor ID or name. A maximum of 10 flavors can be selected. Use a comma (,) to separate multiple flavor IDs. |
|
Specifies the image ID or name. Its value is the same as that of image_id for specifying the image selected during ECS creation. |
|
Specifies the ECS ID. When using the existing ECS specifications as the template to create AS configurations, specify this parameter. In this case, the flavorRef, imageRef, disk, and security_groups fields do not take effect. If not specified, flavorRef, imageRef, and disk fields are mandatory. |
|
Endpoint URL type to fetch from the service catalog. Choices:
|
|
Specifies the name of the SSH key pair used to log in to the ECS. Mandatory for creating. |
|
Specifies the ECS metadata. |
|
Specifies the initial login password of the administrator account for logging in to an ECS using password authentication. The Linux administrator is root, and the Windows administrator is Administrator. |
|
Specifies information about the injected file. Only text files can be injected. A maximum of five files can be injected at a time and the maximum size of each file is 1 KB. |
|
Specifies the content of the injected file. Mandatory. |
|
Specifies the path of the injected file. Mandatory. |
|
Specifies the EIP of the ECS. The EIP can be configured in two ways. 1.Do not use an EIP. 2. Automatically assign an EIP. You need to specify the information about the new EIP. |
|
Specifies the EIP automatically assigned to the ECS. Mandatory. |
|
Specifies the bandwidth of an IP address. Mandatory. |
|
Specifies the bandwidth billing mode. Mandatory. |
|
Specifies the bandwidth sharing type. Mandatory. |
|
Specifies the bandwidth (Mbit/s). Mandatory. |
|
Specifies the EIP type. Mandatory. |
|
Name of the region. |
|
Specifies the AS configuration name. It can be only 'name' in order to create AS configuration. It can be 'name' or 'id' in order to delete. Mandatory. |
|
Log level of the OpenStackSDK Choices:
|
|
Path to the logfile of the OpenStackSDK. If empty no log is written |
|
Specifies security groups. If the security group is specified both in the AS configuration and AS group, the security group specified in the AS configuration prevails. If the security group is not specified in either of them, the default security group is used. |
|
Specifies the ID of the security group. Mandatory. |
|
Whether resource should be present or absent. Choices:
|
|
How long should ansible wait for the requested resource. Default: |
|
Specifies the user data to be injected during the ECS creation process. Text, text files, and gzip files can be injected. The content to be injected must be encoded with base64. The maximum size of the content to be injected (before encoding) is 32 KB. |
|
Whether or not SSL API requests should be verified. Before Ansible 2.3 this defaulted to Choices:
|
|
Should ansible wait until the requested resource is complete. Choices:
|
Notes¶
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/
Examples¶
# Create as configuration.
opentelekomcloud.cloud.as_config:
scaling_configuration_name: "as-config-test2"
key_name: "as-config-test"
image: "9e4322d2-fc79-4d20-966b-41ff78fb7c48"
flavor: "c4.2xlarge.2"
disk:
- size: 10
volume_type: 'sas'
disk_type: 'sys'
- size: 10
volume_type: 'sas'
disk_type: 'data'
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
AS groups object. Returned: On Success. |
|
Specifies the AS configuration ID. Returned: success Sample: |