Skip to content

Commit

Permalink
Fixes geerlingguy#303: Update 'Dynamic inventory with AWS' example to…
Browse files Browse the repository at this point in the history
… use aws_ec2 plugin.
  • Loading branch information
geerlingguy committed Jul 31, 2020
1 parent dfad2cc commit 6ca0abf
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 849 deletions.
2 changes: 1 addition & 1 deletion dynamic-inventory/digitalocean/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
gather_facts: False

tasks:
- name: Wait for host to become reachable.
- name: Wait for hosts to become reachable.
wait_for_connection:

- name: Install tcpdump.
Expand Down
2 changes: 1 addition & 1 deletion lamp-infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ After everything is booted and configured, visit the IP address of the Varnish s

- Public IP addresses are used for all cross-instance communication (e.g. PHP to MySQL/Memcached communication, MySQL master/slave replication). For better security and potentially a tiny performance improvement, you can use instances' `private_ip` for cross-instance communication.
- Hosting instances on AWS may incur hosting fees (unless all usage falls within AWS's first-year free tier limits). While the charges will be nominal (likely less than $1 USD for many hours of testing), it's important to destroy instances you aren't actively using!
- You can use the included `ec2.py` inventory script for dynamic inventory (`./ec2.py --list` to test).
- You can use the included `aws_ec2.yml` inventory plugin configuration for dynamic inventory (`ansible-inventory -i inventories/aws/aws_ec2.yml --graph` to test).

## About the Author

Expand Down
14 changes: 14 additions & 0 deletions lamp-infrastructure/inventories/aws/aws_ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
plugin: aws_ec2

regions:
- us-east-1

hostnames:
- ip-address

keyed_groups:
- key: tags.inventory_group
separator: ''
- key: tags.Application
separator: ''
95 changes: 0 additions & 95 deletions lamp-infrastructure/inventories/aws/ec2.ini

This file was deleted.

Loading

0 comments on commit 6ca0abf

Please sign in to comment.