From c7f33627950d352cdca46f71c93b0783981b8c89 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Mon, 6 Apr 2015 14:43:39 +0200 Subject: [PATCH] Replace - in ec2 inventory as well Dash (-) is not a variable ansible group name, so it needs to be replaced as well. --- plugins/inventory/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/ec2.py b/plugins/inventory/ec2.py index e93df1053d1..76871b0266d 100755 --- a/plugins/inventory/ec2.py +++ b/plugins/inventory/ec2.py @@ -787,7 +787,7 @@ class Ec2Inventory(object): ''' Converts 'bad' characters in a string to underscores so they can be used as Ansible groups ''' - return re.sub("[^A-Za-z0-9\-]", "_", word) + return re.sub("[^A-Za-z0-9\_]", "_", word) def json_format_dict(self, data, pretty=False):