You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
8.8 KiB

  1. # Ansible EC2 external inventory script settings
  2. #
  3. [ec2]
  4. # to talk to a private eucalyptus instance uncomment these lines
  5. # and edit edit eucalyptus_host to be the host name of your cloud controller
  6. #eucalyptus = True
  7. #eucalyptus_host = clc.cloud.domain.org
  8. # AWS regions to make calls to. Set this to 'all' to make request to all regions
  9. # in AWS and merge the results together. Alternatively, set this to a comma
  10. # separated list of regions. E.g. 'us-east-1,us-west-1,us-west-2' and do not
  11. # provide the 'regions_exclude' option. If this is set to 'auto', AWS_REGION or
  12. # AWS_DEFAULT_REGION environment variable will be read to determine the region.
  13. regions = all
  14. regions_exclude = us-gov-west-1, cn-north-1
  15. # When generating inventory, Ansible needs to know how to address a server.
  16. # Each EC2 instance has a lot of variables associated with it. Here is the list:
  17. # http://docs.pythonboto.org/en/latest/ref/ec2.html#module-boto.ec2.instance
  18. # Below are 2 variables that are used as the address of a server:
  19. # - destination_variable
  20. # - vpc_destination_variable
  21. # This is the normal destination variable to use. If you are running Ansible
  22. # from outside EC2, then 'public_dns_name' makes the most sense. If you are
  23. # running Ansible from within EC2, then perhaps you want to use the internal
  24. # address, and should set this to 'private_dns_name'. The key of an EC2 tag
  25. # may optionally be used; however the boto instance variables hold precedence
  26. # in the event of a collision.
  27. destination_variable = public_dns_name
  28. # This allows you to override the inventory_name with an ec2 variable, instead
  29. # of using the destination_variable above. Addressing (aka ansible_ssh_host)
  30. # will still use destination_variable. Tags should be written as 'tag_TAGNAME'.
  31. #hostname_variable = tag_Name
  32. # For server inside a VPC, using DNS names may not make sense. When an instance
  33. # has 'subnet_id' set, this variable is used. If the subnet is public, setting
  34. # this to 'ip_address' will return the public IP address. For instances in a
  35. # private subnet, this should be set to 'private_ip_address', and Ansible must
  36. # be run from within EC2. The key of an EC2 tag may optionally be used; however
  37. # the boto instance variables hold precedence in the event of a collision.
  38. # WARNING: - instances that are in the private vpc, _without_ public ip address
  39. # will not be listed in the inventory until You set:
  40. # vpc_destination_variable = private_ip_address
  41. vpc_destination_variable = ip_address
  42. # The following two settings allow flexible ansible host naming based on a
  43. # python format string and a comma-separated list of ec2 tags. Note that:
  44. #
  45. # 1) If the tags referenced are not present for some instances, empty strings
  46. # will be substituted in the format string.
  47. # 2) This overrides both destination_variable and vpc_destination_variable.
  48. #
  49. #destination_format = {0}.{1}.example.com
  50. #destination_format_tags = Name,environment
  51. # To tag instances on EC2 with the resource records that point to them from
  52. # Route53, set 'route53' to True.
  53. route53 = False
  54. # To use Route53 records as the inventory hostnames, uncomment and set
  55. # to equal the domain name you wish to use. You must also have 'route53' (above)
  56. # set to True.
  57. # route53_hostnames = .example.com
  58. # To exclude RDS instances from the inventory, uncomment and set to False.
  59. #rds = False
  60. # To exclude ElastiCache instances from the inventory, uncomment and set to False.
  61. #elasticache = False
  62. # Additionally, you can specify the list of zones to exclude looking up in
  63. # 'route53_excluded_zones' as a comma-separated list.
  64. # route53_excluded_zones = samplezone1.com, samplezone2.com
  65. # By default, only EC2 instances in the 'running' state are returned. Set
  66. # 'all_instances' to True to return all instances regardless of state.
  67. all_instances = False
  68. # By default, only EC2 instances in the 'running' state are returned. Specify
  69. # EC2 instance states to return as a comma-separated list. This
  70. # option is overridden when 'all_instances' is True.
  71. # instance_states = pending, running, shutting-down, terminated, stopping, stopped
  72. # By default, only RDS instances in the 'available' state are returned. Set
  73. # 'all_rds_instances' to True return all RDS instances regardless of state.
  74. all_rds_instances = False
  75. # Include RDS cluster information (Aurora etc.)
  76. include_rds_clusters = False
  77. # By default, only ElastiCache clusters and nodes in the 'available' state
  78. # are returned. Set 'all_elasticache_clusters' and/or 'all_elastic_nodes'
  79. # to True return all ElastiCache clusters and nodes, regardless of state.
  80. #
  81. # Note that all_elasticache_nodes only applies to listed clusters. That means
  82. # if you set all_elastic_clusters to false, no node will be return from
  83. # unavailable clusters, regardless of the state and to what you set for
  84. # all_elasticache_nodes.
  85. all_elasticache_replication_groups = False
  86. all_elasticache_clusters = False
  87. all_elasticache_nodes = False
  88. # API calls to EC2 are slow. For this reason, we cache the results of an API
  89. # call. Set this to the path you want cache files to be written to. Two files
  90. # will be written to this directory:
  91. # - ansible-ec2.cache
  92. # - ansible-ec2.index
  93. cache_path = ~/.ansible/tmp
  94. # The number of seconds a cache file is considered valid. After this many
  95. # seconds, a new API call will be made, and the cache file will be updated.
  96. # To disable the cache, set this value to 0
  97. cache_max_age = 300
  98. # Organize groups into a nested/hierarchy instead of a flat namespace.
  99. nested_groups = False
  100. # Replace - tags when creating groups to avoid issues with ansible
  101. replace_dash_in_groups = True
  102. # If set to true, any tag of the form "a,b,c" is expanded into a list
  103. # and the results are used to create additional tag_* inventory groups.
  104. expand_csv_tags = False
  105. # The EC2 inventory output can become very large. To manage its size,
  106. # configure which groups should be created.
  107. group_by_instance_id = True
  108. group_by_region = True
  109. group_by_availability_zone = True
  110. group_by_aws_account = False
  111. group_by_ami_id = True
  112. group_by_instance_type = True
  113. group_by_instance_state = False
  114. group_by_key_pair = True
  115. group_by_vpc_id = True
  116. group_by_security_group = True
  117. group_by_tag_keys = True
  118. group_by_tag_none = True
  119. group_by_route53_names = True
  120. group_by_rds_engine = True
  121. group_by_rds_parameter_group = True
  122. group_by_elasticache_engine = True
  123. group_by_elasticache_cluster = True
  124. group_by_elasticache_parameter_group = True
  125. group_by_elasticache_replication_group = True
  126. # If you only want to include hosts that match a certain regular expression
  127. # pattern_include = staging-*
  128. # If you want to exclude any hosts that match a certain regular expression
  129. # pattern_exclude = staging-*
  130. # Instance filters can be used to control which instances are retrieved for
  131. # inventory. For the full list of possible filters, please read the EC2 API
  132. # docs: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html#query-DescribeInstances-filters
  133. # Filters are key/value pairs separated by '=', to list multiple filters use
  134. # a list separated by commas. See examples below.
  135. # If you want to apply multiple filters simultaneously, set stack_filters to
  136. # True. Default behaviour is to combine the results of all filters. Stacking
  137. # allows the use of multiple conditions to filter down, for example by
  138. # environment and type of host.
  139. stack_filters = False
  140. # Retrieve only instances with (key=value) env=staging tag
  141. # instance_filters = tag:env=staging
  142. # Retrieve only instances with role=webservers OR role=dbservers tag
  143. # instance_filters = tag:role=webservers,tag:role=dbservers
  144. # Retrieve only t1.micro instances OR instances with tag env=staging
  145. # instance_filters = instance-type=t1.micro,tag:env=staging
  146. # You can use wildcards in filter values also. Below will list instances which
  147. # tag Name value matches webservers1*
  148. # (ex. webservers15, webservers1a, webservers123 etc)
  149. # instance_filters = tag:Name=webservers1*
  150. # An IAM role can be assumed, so all requests are run as that role.
  151. # This can be useful for connecting across different accounts, or to limit user
  152. # access
  153. # iam_role = role-arn
  154. # A boto configuration profile may be used to separate out credentials
  155. # see http://boto.readthedocs.org/en/latest/boto_config_tut.html
  156. # boto_profile = some-boto-profile-name
  157. [credentials]
  158. # The AWS credentials can optionally be specified here. Credentials specified
  159. # here are ignored if the environment variable AWS_ACCESS_KEY_ID or
  160. # AWS_PROFILE is set, or if the boto_profile property above is set.
  161. #
  162. # Supplying AWS credentials here is not recommended, as it introduces
  163. # non-trivial security concerns. When going down this route, please make sure
  164. # to set access permissions for this file correctly, e.g. handle it the same
  165. # way as you would a private SSH key.
  166. #
  167. # Unlike the boto and AWS configure files, this section does not support
  168. # profiles.
  169. #
  170. # aws_access_key_id = AXXXXXXXXXXXXXX
  171. # aws_secret_access_key = XXXXXXXXXXXXXXXXXXX
  172. # aws_security_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXX