summaryrefslogtreecommitdiffstats
path: root/inventory/multi_ec2.yaml.example
blob: 99f157b11df5acad42d688b81cf6d867d272e991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# multi ec2 inventory configs
#
cache_location: ~/.ansible/tmp/multi_ec2_inventory.cache

accounts:
  - name: aws1
    provider: aws/hosts/ec2.py
    provider_config:
      ec2:
        regions: all
        regions_exclude:  us-gov-west-1,cn-north-1
        destination_variable: public_dns_name
        route53: False
        cache_path: ~/.ansible/tmp
        cache_max_age: 300
        vpc_destination_variable: ip_address
    env_vars:
      AWS_ACCESS_KEY_ID: XXXXXXXXXXXXXXXXXXXX
      AWS_SECRET_ACCESS_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    all_group: ec2
    hostvars:
      cloud: aws
      account: aws1

- name: aws2
    provider: aws/hosts/ec2.py
    env_vars:
      AWS_ACCESS_KEY_ID: XXXXXXXXXXXXXXXXXXXX
      AWS_SECRET_ACCESS_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      EC2_INI_PATH: /etc/ansible/ec2.ini

cache_max_age: 60