ec2_asg - Create or delete AWS Autoscaling Groups

Author:Gareth Rushgrove

Synopsis

New in version 1.6.

Can create or delete AWS Autoscaling Groups Works with the ec2_lc module to manage Launch Configurations

Options

parameter required default choices comments
availability_zones no
    List of availability zone names in which to create the group. Defaults to all the availability zones in the region if vpc_zone_identifier is not set.
    aws_access_key no
      AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used.
      aws_secret_key no
        AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.
        desired_capacity no
          Desired number of instances in group
          ec2_url no
            Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Must be specified if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used
            launch_config_name no
              Name of the Launch configuration to use for the group. See the ec2_lc module for managing these.
              load_balancers no
                List of ELB names to use for the group
                max_size no
                  Maximum number of instances in group
                  min_size no
                    Minimum number of instances in group
                    name yes
                      Unique name for group to be created or deleted
                      profile no
                        uses a boto profile. Only works with boto >= 2.24.0 (added in Ansible 1.6)
                        region no
                          The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
                          security_token no
                            security token to authenticate against AWS (added in Ansible 1.6)
                            state yes
                            • present
                            • absent
                            register or deregister the instance
                            validate_certs no yes
                            • yes
                            • no
                            When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0. (added in Ansible 1.5)
                            vpc_zone_identifier no None
                              List of VPC subnets to use

                              Note

                              Requires boto

                              Examples


                              - ec2_asg:
                                  name: special
                                  load_balancers: 'lb1,lb2'
                                  availability_zones: 'eu-west-1a,eu-west-1b'
                                  launch_config_name: 'lc-1'
                                  min_size: 1
                                  max_size: 10
                                  desired_capacity: 5
                                  vpc_zone_identifier: 'subnet-abcd1234,subnet-1a2b3c4d'
                              

                              Note

                              The following environment variables can be used AWS_ACCESS_KEY or EC2_ACCESS_KEY or AWS_ACCESS_KEY_ID, AWS_SECRET_KEY or EC2_SECRET_KEY or AWS_SECRET_ACCESS_KEY, AWS_REGION or EC2_REGION, AWS_SECURITY_TOKEN

                              Note

                              Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See http://boto.readthedocs.org/en/latest/boto_config_tut.html

                              Note

                              AWS_REGION or EC2_REGION can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file