diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index 3def6037a1f..dcc369e1249 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -1313,7 +1313,7 @@ class Ec2Inventory(object): elif key == 'ec2_tags': for k, v in value.items(): if self.expand_csv_tags and ',' in v: - v = map(lambda x: x.strip(), v.split(',')) + v = list(map(lambda x: x.strip(), v.split(','))) key = self.to_safe('ec2_tag_' + k) instance_vars[key] = v elif key == 'ec2_groups':