community / community.general / 2.5.9 / module / rax_scaling_policy Manipulate Rackspace Cloud Autoscale Scaling Policy Authors: Matt Martz (@sivel)community.general.rax_scaling_policy (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Manipulate Rackspace Cloud Autoscale Scaling Policy
--- - hosts: localhost gather_facts: false connection: local tasks: - community.general.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 - community.general.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 - community.general.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) type: str 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 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 * * *) type: str name: description: - Name to give the policy required: true type: str state: choices: - present - absent default: present description: - Indicate desired state of the resource type: str 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. type: int region: description: - Region to create an instance in. type: str api_key: aliases: - password description: - Rackspace API key, overrides I(credentials). type: str cooldown: default: 300 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). type: int username: description: - Rackspace username, overrides I(credentials). type: str tenant_id: description: - The tenant ID used for authentication. type: str 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 type: str tenant_name: description: - The tenant name used for authentication. type: str auth_endpoint: description: - The URI of the authentication service. - If not specified will be set to U(https://identity.api.rackspacecloud.com/v2.0/) type: str identity_type: default: rackspace description: - Authentication mechanism to use, such as rackspace or keystone. type: str scaling_group: description: - Name of the scaling group that this policy will be added to required: true type: str validate_certs: aliases: - verify_ssl description: - Whether or not to require SSL validation of API endpoints. type: bool desired_capacity: description: - The desired server capacity of the scaling the group; that is, how many servers should be in the scaling group. type: int