Paul Logston
e8768b2b87
Use six to check for string_types
2015-04-25 19:45:22 -04:00
Paul Logston
50932ce556
Use six.moves to import configparser
2015-04-25 17:06:01 -04:00
Paul Logston
1674b47445
Make ec2 inventory plugin Python 3 compatible
2015-04-24 21:14:06 -04:00
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.
2015-04-06 14:43:39 +02:00
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.
2015-03-27 10:46:01 +01:00
Steve Gargan
ada2567dfb
log errors and explicitly exit rather than raising exceptions
2015-03-16 20:00:18 +00:00
Steve Gargan
fbff0449ce
fix for issue #10422 . outputs informative error message when AWS credentials are not available
2015-03-15 12:24:42 +00:00
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 .
2015-02-11 01:47:37 -05:00
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.
2015-02-02 12:58:58 -05:00
Chris Meyers
48d4da3a94
add tagless grouping for destinations without any tags
2015-01-16 10:28:34 -05:00
Jason
d39a25d225
Corrected spelling mistake
2015-01-08 17:11:16 +11:00
Dan Jenkins
d7b36dd9e7
Add a new inventory group so you can see instances in a particular VPC
2014-12-19 10:39:56 +00:00
Kale Franz
28e69b9017
Allow ec2 tags to be used to address servers in ec2 dynamic inventory.
2014-12-15 22:31:29 -08:00
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
2014-10-17 12:16:35 -04:00
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.
2014-09-03 00:50:28 +02:00
Michael Peters
8b1d6f5e75
fixing "else" typo
2014-08-12 15:48:14 -04:00
Michael Peters
7194fe1064
need to handle the case where include_pattern and exclude_pattern exist in the config file but contain empty strings
2014-08-12 15:40:15 -04:00
Michael Peters
7c2cc15c59
adding include_pattern and exclude_pattern options to ec2.py
2014-08-08 09:26:14 -04:00
James Cammarata
0ae87cb725
Merge branch 'ec2inv-rdstoggle' of https://github.com/ingmar/ansible into ingmar-ec2inv-rdstoggle
...
Conflicts:
plugins/inventory/ec2.py
2014-07-31 13:38:54 -05:00
James Cammarata
5764015876
Merge branch 'ec2_nested_groups' of https://github.com/cchurch/ansible into cchurch-ec2_nested_groups
...
Conflicts:
plugins/inventory/ec2.py
2014-07-31 13:07:31 -05:00
Adam Chainz
13a5993a49
Fix indentation in ec2.py
2014-07-14 10:59:17 +01:00
Chris Church
7f27c56a79
Add option to return all EC2/RDS instances regardless of state.
2014-07-01 15:50:04 -04:00
Chris Church
4036df11cf
Add configurable option to support nested inventory groups.
2014-07-01 15:29:39 -04:00
Ingmar Hupp
cc01f7b7f5
Do not filter out RDS instances by default or in INI file to avoid changing current behaviour.
2014-03-27 18:58:46 +00:00
Ingmar Hupp
456d2627e8
EC2 inventory toggle to exclude/include RDS instances.
2014-03-27 15:57:24 +00:00
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.
2014-02-06 15:10:20 -05:00
Timur Batyrshin
658c15930e
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 ( #5852 )
2014-02-03 13:00:40 -06:00
jctanner
57d54c1da5
Merge pull request #5236 from willthames/ec2_inv_rds_fail_safe
...
ec2 inventory: Fail EC2 inventory better with restricted EC2 users
2014-01-06 12:57:21 -08:00
jctanner
fd4ae165e4
Merge pull request #5153 from willthames/ec2_inventory_multiuser
...
Allow multiple users to use ec2 inventory scripts
2014-01-06 12:55:08 -08:00
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.
2013-12-10 21:32:54 +10:00
Lorrin Nelson
663deff2c2
Fix loading from cache in ec2.py inventory plugin.
2013-12-05 21:33:25 -08:00
Lorrin Nelson
94d60b53de
ec2 inventory now include Ansible 1.3 style _meta data each host.
2013-12-05 11:40:18 -08:00
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.
2013-12-04 11:42:44 +10:00
Michael DeHaan
30e72a4b1b
Merge pull request #4842 from cchurch/devel
...
Retrieve EC2 state when using newer versions of Boto
2013-11-18 11:45:56 -08:00
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
2013-11-11 14:09:34 -05:00
Chris Church
a6135c1c16
Support retrieving EC2 state/previous_state when using newer versions of Boto.
2013-11-07 16:04:55 -05:00
Chris Church
9aacecd3fa
Allow specifying an alternate ec2.ini path via EC2_INI_PATH environment variable.
2013-10-04 16:14:05 -04:00
Herby Gillot
8b3674bf58
minor spacing cleanup
2013-09-23 21:43:00 -04:00
Herby Gillot
6ddebb3fad
ec2 inventory route53 tagging:
...
* make filtering more comprehensive
* add checks against missing route53 zone exclusion option
2013-09-23 21:40:18 -04:00
Herby Gillot
91785ba045
ec2 inventory: Add the ability to group instances by Route 53 domain
...
names.
2013-09-23 14:00:56 -04:00
Herby Gillot
36fe595de8
ec2 inventory script: Add a global group for EC2 and RDS instances when
...
listing EC2 inventory
2013-09-02 22:02:56 -04:00
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
2013-08-31 17:58:37 -04:00
Herby Gillot
c2f8215c06
ec2 inventory: Verify that a security group exists before trying to use its name as a key in inventory.
2013-08-22 15:29:15 -05:00
Tim Gerla
57b72d242a
ec2 inventory plugin: fix whitespace around connection validity test
2013-06-26 09:22:16 -07:00
jclaybaugh
f4db6d1a91
fixed whitespace and added a comment to explain if statement
2013-06-07 18:25:14 +00:00
jclaybaugh
4733dc6b5b
added error checking around boto ec2 connection errors when using a bad region name
2013-06-07 18:13:22 +00:00
Michael DeHaan
76723f6b37
Merge pull request #2610 from peterjanes/devel
...
Basic RDS support for EC2 inventory
2013-04-27 08:10:57 -07:00
milan
27b8d3567e
check hostname presence
2013-03-15 10:15:41 +01:00
Peter Janes
bcc2e84a4b
Fix reference to parameter group name
2013-03-13 16:51:43 -04:00
Peter Janes
dd2d0dd175
Add basic inventory support for RDS instances
2013-03-13 16:43:26 -04:00