summaryrefslogtreecommitdiffstats
path: root/inventory
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-03-09 10:45:29 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-03-09 10:45:29 -0400
commitd69afcdadf295a2508b0dd1edf638724619e995d (patch)
tree904fd267d0f98df61ed915c5c48f59b6e7e5b5fd /inventory
parentf8df2a785f791151e11f8274711c5d4405e550eb (diff)
parent4c409949300274bcd829dda89562402be0f4e976 (diff)
downloadopenshift-d69afcdadf295a2508b0dd1edf638724619e995d.tar.gz
openshift-d69afcdadf295a2508b0dd1edf638724619e995d.tar.bz2
openshift-d69afcdadf295a2508b0dd1edf638724619e995d.tar.xz
openshift-d69afcdadf295a2508b0dd1edf638724619e995d.zip
Merge pull request #104 from twiest/fix_multi_ec2_py
fixed bug in new ec2.py destination_format code
Diffstat (limited to 'inventory')
-rwxr-xr-x[-rw-r--r--]inventory/aws/ec2.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/inventory/aws/ec2.py b/inventory/aws/ec2.py
index f4e029553..1a863d8a8 100644..100755
--- a/inventory/aws/ec2.py
+++ b/inventory/aws/ec2.py
@@ -215,8 +215,14 @@ class Ec2Inventory(object):
# Destination addresses
self.destination_variable = config.get('ec2', 'destination_variable')
self.vpc_destination_variable = config.get('ec2', 'vpc_destination_variable')
- self.destination_format = config.get('ec2', 'destination_format')
- self.destination_format_tags = config.get('ec2', 'destination_format_tags', '').split(',')
+
+ if config.has_option('ec2', 'destination_format') and \
+ config.has_option('ec2', 'destination_format_tags'):
+ self.destination_format = config.get('ec2', 'destination_format')
+ self.destination_format_tags = config.get('ec2', 'destination_format_tags').split(',')
+ else:
+ self.destination_format = None
+ self.destination_format_tags = None
# Route53
self.route53_enabled = config.getboolean('ec2', 'route53')