Merge pull request #14761 from enbritely/fix-ec2-inventory
Fix AWS EC2 inventory script instance_filters read
This commit is contained in:
commit
f0af07a5f4
1 changed files with 4 additions and 1 deletions
|
@ -388,7 +388,10 @@ class Ec2Inventory(object):
|
|||
# Instance filters (see boto and EC2 API docs). Ignore invalid filters.
|
||||
self.ec2_instance_filters = defaultdict(list)
|
||||
if config.has_option('ec2', 'instance_filters'):
|
||||
for instance_filter in config.get('ec2', 'instance_filters', '').split(','):
|
||||
|
||||
filters = [f for f in config.get('ec2', 'instance_filters').split(',') if f]
|
||||
|
||||
for instance_filter in filters:
|
||||
instance_filter = instance_filter.strip()
|
||||
if not instance_filter or '=' not in instance_filter:
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue