opentelekomcloud.cloud.as_config (0.14.2) — module

Create/Remove AutoScaling configuration from the OTC

| "added in version" 0.2.0 of opentelekomcloud.cloud"

Authors: Polina Gubina (@Polina-Gubina)

Install collection

Install with ansible-galaxy collection install opentelekomcloud.cloud:==0.14.2


Add to requirements.yml

  collections:
    - name: opentelekomcloud.cloud
      version: 0.14.2

Description

Create/Remove AutoScaling configuration from the OTC.


Requirements

Inputs

    
auth:
    description:
    - Dictionary containing auth information as needed by the cloud's auth plugin strategy.
      For the default I(password) plugin, this would contain I(auth_url), I(username),
      I(password), I(project_name) and any information about domains (for example, I(os_user_domain_name)
      or I(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.
    type: dict

disk:
    description:
    - Specifies the disk group information. System disks are mandatory and data disks
      are optional.
    elements: dict
    suboptions:
      data_disk_image_id:
        description:
        - Specifies the ID of a data disk image used to export data disks of an ECS.
        type: str
      dedicated_storage_id:
        description:
        - Specifies a DSS device ID for creating an ECS disk.
        type: str
      disk_type:
        choices:
        - data
        - sys
        description:
        - Specifies a disk type.
        - Mandatory.
        required: true
        type: str
      metadata:
        description:
        - Specifies the metadata for creating disks.
        suboptions:
          __system__cmkid:
            description:
            - Specifies the CMK ID, which indicates encryption in metadata.                          This
              parameter is used with __system__encrypted.
            type: str
          __system__encrypted:
            choices:
            - '0'
            - '1'
            default: '0'
            description:
            - Specifies encryption in metadata. The value can be 0 (encryption disabled)                         or
              1 (encryption enabled).
            type: str
        type: dict
      size:
        description:
        - Specifies the disk size. The unit is GB.
        - Mandatory.
        required: true
        type: int
      snapshot_id:
        description:
        - 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.
        type: str
      volume_type:
        choices:
        - sata
        - sas
        - ssd
        - co-p1
        - uh-l1
        description:
        - Specifies the ECS system disk type.
        - Mandatory.
        required: true
        type: str
    type: list

wait:
    default: true
    description:
    - Should ansible wait until the requested resource is complete.
    type: bool

cloud:
    description:
    - Named cloud or cloud config to operate against. If I(cloud) is a string, it references
      a named cloud config as defined in an OpenStack clouds.yaml file. Provides default
      values for I(auth) and I(auth_type). This parameter is not needed if I(auth) is
      provided or if OpenStack OS_* environment variables are present. If I(cloud) is
      a dict, it contains a complete cloud configuration like would be in a section of
      clouds.yaml.
    type: raw

image:
    description:
    - Specifies the image ID or name. Its value is the same as that of image_id for specifying
      the image       selected during ECS creation.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether resource should be present or absent.
    type: str

flavor:
    description:
    - Specifies the ECS flavor ID or name. A maximum of 10 flavors can be selected.       Use
      a comma (,) to separate multiple flavor IDs.
    type: str

ca_cert:
    aliases:
    - cacert
    description:
    - A path to a CA Cert bundle that can be used as part of verifying SSL API requests.
    type: str

timeout:
    default: 180
    description:
    - How long should ansible wait for the requested resource.
    type: int

key_name:
    description:
    - Specifies the name of the SSH key pair used to log in to the ECS.
    - Mandatory for creating.
    type: str

metadata:
    description:
    - Specifies the ECS metadata.
    suboptions:
      admin_pass:
        description:
        - 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.
        type: str
    type: dict

auth_type:
    description:
    - 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 I(auth) parameter should be updated accordingly.
    type: str

interface:
    aliases:
    - endpoint_type
    choices:
    - admin
    - internal
    - public
    default: public
    description:
    - Endpoint URL type to fetch from the service catalog.
    type: str

public_ip:
    description:
    - 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.
    suboptions:
      eip:
        description:
        - Specifies the EIP automatically assigned to the ECS.
        - Mandatory.
        required: true
        suboptions:
          bandwidth:
            description:
            - Specifies the bandwidth of an IP address.
            - Mandatory.
            required: true
            suboptions:
              charging_mode:
                description:
                - Specifies the bandwidth billing mode.
                - Mandatory.
                required: true
                type: str
              share_type:
                description:
                - Specifies the bandwidth sharing type.
                - Mandatory.
                required: true
                type: str
              size:
                description:
                - Specifies the bandwidth (Mbit/s).
                - Mandatory.
                required: true
                type: int
            type: dict
          ip_type:
            description:
            - Specifies the EIP type.
            - Mandatory.
            required: true
            type: str
        type: dict
    type: dict

user_data:
    description:
    - 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.
    type: str

client_key:
    aliases:
    - key
    description:
    - A path to a client key to use as part of the SSL transaction.
    type: str

api_timeout:
    description:
    - 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.
    type: int

client_cert:
    aliases:
    - cert
    description:
    - A path to a client certificate to use as part of the SSL transaction.
    type: str

instance_id:
    description:
    - 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.
    type: str

personality:
    description:
    - 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.
    elements: dict
    suboptions:
      content:
        description:
        - Specifies the content of the injected file.
        - Mandatory.
        required: true
        type: str
      path:
        description:
        - Specifies the path of the injected file.
        - Mandatory.
        required: true
        type: str
    type: list

region_name:
    description:
    - Name of the region.
    type: str

sdk_log_path:
    description:
    - Path to the logfile of the OpenStackSDK. If empty no log is written
    type: str

sdk_log_level:
    choices:
    - ERROR
    - WARN
    - INFO
    - DEBUG
    default: WARN
    description: Log level of the OpenStackSDK
    type: str

validate_certs:
    aliases:
    - verify
    description:
    - Whether or not SSL API requests should be verified.
    - Before Ansible 2.3 this defaulted to C(yes).
    type: bool

security_groups:
    description:
    - 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.
    elements: dict
    suboptions:
      id:
        description:
        - Specifies the ID of the security group.
        - Mandatory.
        required: true
        type: str
    type: list

scaling_configuration:
    description:
    - 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.
    required: true
    type: str

Outputs

as_group:
  contains:
    scaling_configuration_id:
      description: Specifies the AS configuration ID.
      sample: 39007a7e-ee4f-4d13-8283-b4da2e037c69
      type: str
  description: AS groups object.
  returned: On Success.
  type: complex