Reading the config file from the same directory as the script, and
fixing typo in security group name
This commit is contained in:
parent
e63659d04e
commit
111561f782
1 changed files with 2 additions and 2 deletions
|
@ -168,7 +168,7 @@ class Ec2Inventory(object):
|
||||||
''' Reads the settings from the ec2.ini file '''
|
''' Reads the settings from the ec2.ini file '''
|
||||||
|
|
||||||
config = ConfigParser.SafeConfigParser()
|
config = ConfigParser.SafeConfigParser()
|
||||||
config.read('ec2.ini')
|
config.read(os.path.dirname(os.path.realpath(__file__)) + '/ec2.ini')
|
||||||
|
|
||||||
# Regions
|
# Regions
|
||||||
self.regions = []
|
self.regions = []
|
||||||
|
@ -265,7 +265,7 @@ class Ec2Inventory(object):
|
||||||
|
|
||||||
# Inventory: Group by security group
|
# Inventory: Group by security group
|
||||||
for group in instance.groups:
|
for group in instance.groups:
|
||||||
key = self.to_safe("security-group_" + group.name)
|
key = self.to_safe("security_group_" + group.name)
|
||||||
self.push(self.inventory, key, dest)
|
self.push(self.inventory, key, dest)
|
||||||
|
|
||||||
# Inventory: Group by tag keys
|
# Inventory: Group by tag keys
|
||||||
|
|
Loading…
Reference in a new issue