ANSIBLE.RDS(3)

NAME
rds - create or delete an Amazon rds instance

DESCRIPTION

Creates or deletes rds instances. When creating an instance it can be either a new instance or a read-only replica of an existing instance. This module has a dependency on python-boto >= 2.5.

OPTIONS

apply_immediately
    Used only when command=modify. If enabled, the modifications will be applied as soon as possible rather than waiting for the next preferred maintenance window. Choices: yes,no.

aws_access_key
    AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used.

aws_secret_key
    AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.

backup_retention
    Number of days backups are retained. Set to 0 to disable backups. Default is 1 day. Valid range: 0-35. Used only when command=create or command=modify.

backup_window
    Backup window in format of hh24:mi-hh24:mi. If not specified then a random backup window is assigned. Used only when command=create or command=modify.

command
    Specifies the action to take. Choices: create,replicate,delete,facts,modify.(required)

db_engine
    The type of database. Used only when command=create. Choices: MySQL,oracle-se1,oracle-se,oracle-ee,sqlserver-ee,sqlserver-se,sqlserver-ex,sqlserver-web.

db_name
    Name of a database to create within the instance. If not specified then no database is created. Used only when command=create.

engine_version
    Version number of the database engine to use. Used only when command=create. If not specified then the current Amazon RDS default engine version is used.

instance_name
    Database instance identifier.(required)

instance_type
    The instance type of the database. Must be specified when command=create. Optional when command=replicate or command=modify. If not specified then the replica inherits the same instance type as the source instance. Choices: db.t1.micro,db.m1.small,db.m1.medium,db.m1.large,db.m1.xlarge,db.m2.xlarge,db.m2.2xlarge,db.m2.4xlarge.

iops
    Specifies the number of IOPS for the instance. Used only when command=create or command=modify. Must be an integer greater than 1000.

license_model
    The license model for this DB instance. Used only when command=create. Choices: license-included,bring-your-own-license,general-public-license.

maint_window
    Maintenance window in format of ddd:hh24:mi-ddd:hh24:mi. (Example: Mon:22:00-Mon:23:15) If not specified then a random maintenance window is assigned. Used only when command=create or command=modify.

multi_zone
    Specifies if this is a Multi-availability-zone deployment. Can not be used in conjunction with zone parameter. Used only when command=create or command=modify. Choices: yes,no.

option_group
    The name of the option group to use. If not specified then the default option group is used. Used only when command=create.

parameter_group
    Name of the DB parameter group to associate with this instance. If omitted then the RDS default DBParameterGroup will be used. Used only when command=create or command=modify.

password
    Password for the master database username. Used only when command=create or command=modify.

port
    Port number that the DB instance uses for connections. Defaults to 3306 for mysql, 1521 for Oracle, 1443 for SQL Server. Used only when command=create or command=replicate.

region
    The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.(required)

security_groups
    Comma separated list of one or more security groups. Used only when command=create or command=modify. If a subnet is specified then this is treated as a list of VPC security groups.

size
    Size in gigabytes of the initial storage for the DB instance. Used only when command=create or command=modify.

snapshot
    Name of final snapshot to take when deleting an instance. If no snapshot name is provided then no snapshot is taken. Used only when command=delete.

source_instance
    Name of the database to replicate. Used only when command=replicate.

subnet
    VPC subnet group. If specified then a VPC instance is created. Used only when command=create.

upgrade
    Indicates that minor version upgrades should be applied automatically. Used only when command=create or command=replicate. Choices: yes,no.

username
    Master database username. Used only when command=create.

wait
    When command=create, replicate, or modify then wait for the database to enter the 'available' state. When command=delete wait for the database to be terminated. Choices: yes,no. (default: no)

wait_timeout
    how long before wait gives up, in seconds (default: 300)

zone
    availability zone in which to launch the instance. Used only when command=create or command=replicate.."
    # Basic mysql provisioning example
    - rds: >
          command=create
          instance_name=new_database
          db_engine=MySQL
          size=10
          instance_type=db.m1.small
          username=mysql_admin
          password=1nsecure
    # Create a read-only replica and wait for it to become available
    - rds: >
          command=replicate
          instance_name=new_database_replica
          source_instance=new_database
          wait=yes
          wait_timeout=600
    # Delete an instance, but create a snapshot before doing so
    - rds: >
          command=delete
          instance_name=new_database
          snapshot=new_database_snapshot
    # Get facts about an instance
    - rds: >
          command=facts
          instance_name=new_database
          register: new_database_facts

AUTHOR
Bruce Pennypacker

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#rds