Johannes 'fish' Ziemke
c7f3362795
Replace - in ec2 inventory as well
...
Dash (-) is not a variable ansible group name, so it needs to be replaced as well.
10 years ago
Kim Johansson
576832e4c9
Always define error before using it
...
When the error reason is "Forbidden", the code throws a Python exception
rather than simply outputting the exception reason.
It's not nice to throw a Python exception when all the info to display
a proper message is available.
10 years ago
Steve Gargan
ada2567dfb
log errors and explicitly exit rather than raising exceptions
10 years ago
Steve Gargan
fbff0449ce
fix for issue #10422 . outputs informative error message when AWS credentials are not available
10 years ago
Chris Church
05bb31450b
Update EC2 inventory script with changes from Tower.
...
- Adds to changes from #6676 to support nested VPC group and VPC grouping for RDS.
- Adds to changes from #8822 to ignore invalid instance filters.
- Implements grouping by AMI ID based on #7573 .
- Implements configuration options to limit which groups are created automatically, based on #7573 .
10 years ago
Brian Coca
5eafa1e7c3
Merge pull request #9825 from kalefranz/ec2-inventory-tags
...
Allow ec2 tags to be used to address servers in ec2 dynamic inventory.
10 years ago
Chris Meyers
48d4da3a94
add tagless grouping for destinations without any tags
10 years ago
Jason
d39a25d225
Corrected spelling mistake
10 years ago
Dan Jenkins
d7b36dd9e7
Add a new inventory group so you can see instances in a particular VPC
10 years ago
Kale Franz
28e69b9017
Allow ec2 tags to be used to address servers in ec2 dynamic inventory.
10 years ago
Andres Silva
4755bde28d
adding for loop on list to to handle the return of none when the list is empty. With the previous method if the list was empty the script died. See http://stackoverflow.com/questions/18852324/typeerror-sequence-item-0-expected-string-nonetype-found
10 years ago
Michal Gasek
5b5103e6b4
Add support for filtering EC2 instances in dynamic inventory
...
This allows filtering out EC2 instances based on various different
filters including tags. As requested in 7480 it supports logical "OR"
instead of "AND" on the provided list of filters.
10 years ago
Michael Peters
8b1d6f5e75
fixing "else" typo
10 years ago
Michael Peters
7194fe1064
need to handle the case where include_pattern and exclude_pattern exist in the config file but contain empty strings
10 years ago
Michael Peters
7c2cc15c59
adding include_pattern and exclude_pattern options to ec2.py
10 years ago
James Cammarata
0ae87cb725
Merge branch 'ec2inv-rdstoggle' of https://github.com/ingmar/ansible into ingmar-ec2inv-rdstoggle
...
Conflicts:
plugins/inventory/ec2.py
10 years ago
James Cammarata
5764015876
Merge branch 'ec2_nested_groups' of https://github.com/cchurch/ansible into cchurch-ec2_nested_groups
...
Conflicts:
plugins/inventory/ec2.py
10 years ago
Adam Chainz
13a5993a49
Fix indentation in ec2.py
11 years ago
Chris Church
7f27c56a79
Add option to return all EC2/RDS instances regardless of state.
11 years ago
Chris Church
4036df11cf
Add configurable option to support nested inventory groups.
11 years ago
Ingmar Hupp
cc01f7b7f5
Do not filter out RDS instances by default or in INI file to avoid changing current behaviour.
11 years ago
Ingmar Hupp
456d2627e8
EC2 inventory toggle to exclude/include RDS instances.
11 years ago
Jack Neely
42b01dac9b
ec2.py: Make sure ec2_placement gets handled correctly
...
ec2_placement was missing from the inventory variables ec2.py was
producing. Make sure that gets properly included rather than ignored.
11 years ago
Timur Batyrshin
658c15930e
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 ( #5852 )
11 years ago
jctanner
57d54c1da5
Merge pull request #5236 from willthames/ec2_inv_rds_fail_safe
...
ec2 inventory: Fail EC2 inventory better with restricted EC2 users
11 years ago
jctanner
fd4ae165e4
Merge pull request #5153 from willthames/ec2_inventory_multiuser
...
Allow multiple users to use ec2 inventory scripts
11 years ago
Will Thames
e9a0aff77c
Fail EC2 inventory better with restricted EC2 users
...
If a user has full EC2 access but no RDS access, the user
should still be able to query the EC2 inventory, although
will not obtain any information about any RDS instances.
11 years ago
Lorrin Nelson
663deff2c2
Fix loading from cache in ec2.py inventory plugin.
11 years ago
Lorrin Nelson
94d60b53de
ec2 inventory now include Ansible 1.3 style _meta data each host.
11 years ago
willthames
3a0d2860e0
Allow multiple users to use ec2 inventory scripts
...
Move the ec2 cache files from a shared /tmp location to the
user's ansible tmp directory.
11 years ago
Michael DeHaan
30e72a4b1b
Merge pull request #4842 from cchurch/devel
...
Retrieve EC2 state when using newer versions of Boto
11 years ago
James Tanner
5eaaca68d1
Merge pull request #4005 from herbyg-axial/ansible/
...
ec2 inventory script: Add a global group for EC2 and RDS instances when listing EC2 inventory
11 years ago
Chris Church
a6135c1c16
Support retrieving EC2 state/previous_state when using newer versions of Boto.
11 years ago
Chris Church
9aacecd3fa
Allow specifying an alternate ec2.ini path via EC2_INI_PATH environment variable.
11 years ago
Herby Gillot
8b3674bf58
minor spacing cleanup
11 years ago
Herby Gillot
6ddebb3fad
ec2 inventory route53 tagging:
...
* make filtering more comprehensive
* add checks against missing route53 zone exclusion option
11 years ago
Herby Gillot
91785ba045
ec2 inventory: Add the ability to group instances by Route 53 domain
...
names.
11 years ago
Herby Gillot
36fe595de8
ec2 inventory script: Add a global group for EC2 and RDS instances when
...
listing EC2 inventory
11 years ago
Jeremy Price
ad75350919
adding regions_exclude parameter to be able to do subtractive region exclusion. Defaults to us-gov-west-1 so as to not cause errors for people who don't have govcloud credentials but get it in their regions list
11 years ago
Herby Gillot
c2f8215c06
ec2 inventory: Verify that a security group exists before trying to use its name as a key in inventory.
11 years ago
Tim Gerla
57b72d242a
ec2 inventory plugin: fix whitespace around connection validity test
12 years ago
jclaybaugh
f4db6d1a91
fixed whitespace and added a comment to explain if statement
12 years ago
jclaybaugh
4733dc6b5b
added error checking around boto ec2 connection errors when using a bad region name
12 years ago
Michael DeHaan
76723f6b37
Merge pull request #2610 from peterjanes/devel
...
Basic RDS support for EC2 inventory
12 years ago
milan
27b8d3567e
check hostname presence
12 years ago
Peter Janes
bcc2e84a4b
Fix reference to parameter group name
12 years ago
Peter Janes
dd2d0dd175
Add basic inventory support for RDS instances
12 years ago
Blair Zajac
fa8e653011
Simplify and correct comparisons with None.
12 years ago
Tim Gerla
168fcb0a4a
Only inventory "running" EC2 instances. "stopped" is also a valid state and these should not be inventoried.
12 years ago
Peter Sankauskas
39efcd0766
While I haven't done this, it is possible to bring up an instance
...
without a keypair, so this takes care of that scenario
12 years ago