community / community.general / 0.1.1 / module / rax_scaling_policy Manipulate Rackspace Cloud Autoscale Scaling Policy Authors: Matt Martz (@sivel) preview | supported by communitycommunity.general.rax_scaling_policy (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manipulate Rackspace Cloud Autoscale Scaling Policy
--- - hosts: localhost gather_facts: false connection: local tasks: - rax_scaling_policy: credentials: ~/.raxpub region: ORD at: '2013-05-19T08:07:08Z' change: 25 cooldown: 300 is_percent: true name: ASG Test Policy - at policy_type: schedule scaling_group: ASG Test register: asps_at - rax_scaling_policy: credentials: ~/.raxpub region: ORD cron: '1 0 * * *' change: 25 cooldown: 300 is_percent: true name: ASG Test Policy - cron policy_type: schedule scaling_group: ASG Test register: asp_cron - rax_scaling_policy: credentials: ~/.raxpub region: ORD cooldown: 300 desired_capacity: 5 name: ASG Test Policy - webhook policy_type: webhook scaling_group: ASG Test register: asp_webhook
at: description: - The UTC time when this policy will be executed. The time must be formatted according to C(yyyy-MM-dd'T'HH:mm:ss.SSS) such as C(2013-05-19T08:07:08Z) env: description: - Environment as configured in I(~/.pyrax.cfg), see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration). type: str version_added: '1.5' version_added_collection: community.general cron: description: - The time when the policy will be executed, as a cron entry. For example, if this is parameter is set to C(1 0 * * *) name: description: - Name to give the policy required: true state: choices: - present - absent default: present description: - Indicate desired state of the resource change: description: - The change, either as a number of servers or as a percentage, to make in the scaling group. If this is a percentage, you must set I(is_percent) to C(true) also. region: default: DFW description: - Region to create an instance in. type: str api_key: aliases: - password description: - Rackspace API key, overrides I(credentials). type: str cooldown: description: - The period of time, in seconds, that must pass before any scaling can occur after the previous scaling. Must be an integer between 0 and 86400 (24 hrs). username: description: - Rackspace username, overrides I(credentials). type: str tenant_id: description: - The tenant ID used for authentication. version_added: '1.5' version_added_collection: community.general is_percent: default: false description: - Whether the value in I(change) is a percent value type: bool credentials: aliases: - creds_file description: - File to find the Rackspace credentials in. Ignored if I(api_key) and I(username) are provided. type: path policy_type: choices: - webhook - schedule description: - The type of policy that will be executed for the current release. required: true tenant_name: description: - The tenant name used for authentication. version_added: '1.5' version_added_collection: community.general auth_endpoint: default: https://identity.api.rackspacecloud.com/v2.0/ description: - The URI of the authentication service. version_added: '1.5' version_added_collection: community.general identity_type: default: rackspace description: - Authentication mechanism to use, such as rackspace or keystone. version_added: '1.5' version_added_collection: community.general scaling_group: description: - Name of the scaling group that this policy will be added to required: true validate_certs: aliases: - verify_ssl description: - Whether or not to require SSL validation of API endpoints. type: bool version_added: '1.5' version_added_collection: community.general desired_capacity: description: - The desired server capacity of the scaling the group; that is, how many servers should be in the scaling group.