From 466cf58476816cb503f891fb185021cb3fe563ce Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sun, 2 Feb 2014 23:28:04 +0100 Subject: [PATCH] ansible generated inventory: skip group variables Except ':children' for groups of groups, it is safer to avoid generating ':suffix' blocks. At the moment Ansible only supports (but doesn't recommend) group variables (:vars), and the Vagrant Ansible provisioner won't support this way to define variables. --- plugins/provisioners/ansible/provisioner.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 33ccf3db3..0fea73fbd 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -110,7 +110,8 @@ module VagrantPlugins if gname.end_with?(":children") groups_of_groups[gname] = gmembers - else + elsif !gname.include?(':') + # skip group variables [:vars] and any other ":" suffixes included_groups << gname file.write("\n[#{gname}]\n") gmembers.each do |gm|