cloudformation - create a AWS CloudFormation stack

Author:James S. Martin

Synopsis

New in version 1.1.

Launches an AWS CloudFormation stack and waits for it complete.

Options

parameter required default choices comments
aws_access_key no
    AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. (added in Ansible 1.5)
    aws_secret_key no
      AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. (added in Ansible 1.5)
      disable_rollback no false
      • true
      • false
      If a stacks fails to form, rollback will remove the stack
      region no
        The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. (added in Ansible 1.5)
        stack_name yes
          name of the cloudformation stack
          state yes
            If state is "present", stack will be created. If state is "present" and if stack exists and template has changed, it will be updated. If state is absent, stack will be removed.
            tags no
              Dictionary of tags to associate with stack and it's resources during stack creation. Cannot be updated later. Requires at least Boto version 2.6.0. (added in Ansible 1.4)
              template yes
                the path of the cloudformation template
                template_parameters no
                  a list of hashes of all the template variables for the stack

                  Note

                  Requires boto

                  Examples


                  # Basic task example
                  tasks:
                  - name: launch ansible cloudformation example
                    action: cloudformation >
                      stack_name="ansible-cloudformation" state=present
                      region=us-east-1 disable_rollback=true
                      template=files/cloudformation-example.json
                    args:
                      template_parameters:
                        KeyName: jmartin
                        DiskType: ephemeral
                        InstanceType: m1.small
                        ClusterSize: 3
                      tags:
                        Stack: ansible-cloudformation