aws_rds – rds instance source¶
Synopsis¶
- Get instances and clusters from Amazon Web Services RDS.
- Uses a YAML configuration file that ends with aws_rds.(yml|yaml).
Requirements¶
The below requirements are needed on the local master node that executes this inventory.
- boto3
- botocore
Parameters¶
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
aws_access_key
string
|
env:EC2_ACCESS_KEY
env:AWS_ACCESS_KEY
env:AWS_ACCESS_KEY_ID
|
The AWS access key to use.
aliases: aws_access_key_id |
|
aws_profile
string
|
env:AWS_DEFAULT_PROFILE
env:AWS_PROFILE
|
The AWS profile
aliases: boto_profile |
|
aws_secret_key
string
|
env:EC2_SECRET_KEY
env:AWS_SECRET_KEY
env:AWS_SECRET_ACCESS_KEY
|
The AWS secret key that corresponds to the access key.
aliases: aws_secret_access_key |
|
aws_security_token
string
|
env:EC2_SECURITY_TOKEN
env:AWS_SESSION_TOKEN
env:AWS_SECURITY_TOKEN
|
The AWS security token if using temporary access and secret keys.
|
|
cache
boolean
|
|
ini entries:
[inventory] env:ANSIBLE_INVENTORY_CACHE
|
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
|
cache_connection
string
|
ini entries:
[defaults] [inventory] env:ANSIBLE_CACHE_PLUGIN_CONNECTION
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
|
Cache connection data or path, read cache plugin documentation for specifics.
|
|
cache_plugin
string
|
Default: "memory"
|
ini entries:
[defaults] [inventory] env:ANSIBLE_CACHE_PLUGIN
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
|
Cache plugin to use for the inventory's source data.
|
cache_prefix
-
|
Default: "ansible_inventory_"
|
ini entries:
[default] [inventory] env:ANSIBLE_CACHE_PLUGIN_PREFIX
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
|
Prefix to use for cache plugin files/tables
|
cache_timeout
integer
|
Default: 3600
|
ini entries:
[defaults] [inventory] env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
|
Cache duration in seconds
|
compose
dictionary
|
Default: {}
|
Create vars from jinja2 expressions.
|
|
filters
-
|
Default: {}
|
A dictionary of filter value pairs. Available filters are listed here https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html#options. If you filter by db-cluster-id and include_clusters is True it will apply to clusters as well.
|
|
groups
dictionary
|
Default: {}
|
Add hosts to group based on Jinja2 conditionals.
|
|
include_clusters
boolean
|
|
Whether or not to query for Aurora clusters as well as instances
|
|
keyed_groups
list
|
Default: []
|
Add hosts to group based on the values of a variable.
|
|
regions
-
|
Default: []
|
A list of regions in which to describe RDS instances and clusters. Available regions are listed here https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
|
|
statuses
list
|
Default: ["creating", "available"]
|
A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything.
|
|
strict
boolean
|
|
If
yes make invalid entries a fatal error, otherwise skip and continue.Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
|
|
strict_permissions
boolean
|
|
By default if an AccessDenied exception is encountered this plugin will fail. You can set strict_permissions to False in the inventory config file which will allow the restrictions to be gracefully skipped.
|
Examples¶
plugin: aws_rds
regions:
- us-east-1
- ca-central-1
keyed_groups:
- key: 'db_parameter_groups|json_query("[].db_parameter_group_name")'
prefix: rds_parameter_group
- key: engine
prefix: rds
- key: tags
- key: region
Status¶
- This inventory is not guaranteed to have a backwards compatible interface. [preview]
- This inventory is maintained by the Ansible Community. [community]
Authors¶
- Sloane Hertel (@s-hertel)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.