2012-08-20 23:46:45 +00:00
|
|
|
# Ansible EC2 external inventory script settings
|
|
|
|
#
|
|
|
|
|
|
|
|
[ec2]
|
|
|
|
|
2012-08-31 13:52:12 +00:00
|
|
|
# to talk to a private eucalyptus instance uncomment these lines
|
|
|
|
# and edit edit eucalyptus_host to be the host name of your cloud controller
|
|
|
|
#eucalyptus = True
|
|
|
|
#eucalyptus_host = clc.cloud.domain.org
|
|
|
|
|
2012-08-20 23:46:45 +00:00
|
|
|
# AWS regions to make calls to. Set this to 'all' to make request to all regions
|
|
|
|
# in AWS and merge the results together. Alternatively, set this to a comma
|
|
|
|
# separated list of regions. E.g. 'us-east-1,us-west-1,us-west-2'
|
|
|
|
regions = all
|
2014-01-19 18:13:43 +00:00
|
|
|
regions_exclude = us-gov-west-1,cn-north-1
|
2012-08-20 23:46:45 +00:00
|
|
|
|
|
|
|
# When generating inventory, Ansible needs to know how to address a server.
|
|
|
|
# Each EC2 instance has a lot of variables associated with it. Here is the list:
|
|
|
|
# http://docs.pythonboto.org/en/latest/ref/ec2.html#module-boto.ec2.instance
|
|
|
|
# Below are 2 variables that are used as the address of a server:
|
|
|
|
# - destination_variable
|
|
|
|
# - vpc_destination_variable
|
|
|
|
|
|
|
|
# This is the normal destination variable to use. If you are running Ansible
|
|
|
|
# from outside EC2, then 'public_dns_name' makes the most sense. If you are
|
|
|
|
# running Ansible from within EC2, then perhaps you want to use the internal
|
|
|
|
# address, and should set this to 'private_dns_name'.
|
|
|
|
destination_variable = public_dns_name
|
|
|
|
|
|
|
|
# For server inside a VPC, using DNS names may not make sense. When an instance
|
|
|
|
# has 'subnet_id' set, this variable is used. If the subnet is public, setting
|
|
|
|
# this to 'ip_address' will return the public IP address. For instances in a
|
|
|
|
# private subnet, this should be set to 'private_ip_address', and Ansible must
|
|
|
|
# be run from with EC2.
|
|
|
|
vpc_destination_variable = ip_address
|
|
|
|
|
2013-09-23 18:00:56 +00:00
|
|
|
# To tag instances on EC2 with the resource records that point to them from
|
|
|
|
# Route53, uncomment and set 'route53' to True.
|
|
|
|
route53 = False
|
2013-09-24 01:40:18 +00:00
|
|
|
|
|
|
|
# Additionally, you can specify the list of zones to exclude looking up in
|
2014-03-08 10:49:55 +00:00
|
|
|
# 'route53_excluded_zones' as a comma-separated list.
|
2013-09-24 01:40:18 +00:00
|
|
|
# route53_excluded_zones = samplezone1.com, samplezone2.com
|
2013-09-23 18:00:56 +00:00
|
|
|
|
2014-07-01 19:50:04 +00:00
|
|
|
# By default, only EC2 instances in the 'running' state are returned. Set
|
|
|
|
# 'all_instances' to True to return all instances regardless of state.
|
|
|
|
all_instances = False
|
|
|
|
|
|
|
|
# By default, only RDS instances in the 'available' state are returned. Set
|
|
|
|
# 'all_rds_instances' to True return all RDS instances regardless of state.
|
|
|
|
all_rds_instances = False
|
|
|
|
|
2012-08-20 23:46:45 +00:00
|
|
|
# API calls to EC2 are slow. For this reason, we cache the results of an API
|
|
|
|
# call. Set this to the path you want cache files to be written to. Two files
|
|
|
|
# will be written to this directory:
|
|
|
|
# - ansible-ec2.cache
|
|
|
|
# - ansible-ec2.index
|
2013-12-04 01:18:15 +00:00
|
|
|
cache_path = ~/.ansible/tmp
|
2012-08-20 23:46:45 +00:00
|
|
|
|
|
|
|
# The number of seconds a cache file is considered valid. After this many
|
|
|
|
# seconds, a new API call will be made, and the cache file will be updated.
|
2014-04-29 16:13:55 +00:00
|
|
|
# To disable the cache, set this value to 0
|
2012-08-20 23:46:45 +00:00
|
|
|
cache_max_age = 300
|