Merge pull request #2273 from czi/fix/master/my_contribution

guests/suse: Update CFEngine provisioners plugin for SuSE install compatibility
This commit is contained in:
Mitchell Hashimoto 2013-10-01 11:43:10 -07:00
commit d052069eb7
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,17 @@
module VagrantPlugins
module CFEngine
module Cap
module SuSE
module CFEngineInstall
def self.cfengine_install(machine, config)
machine.communicate.tap do |comm|
comm.sudo("GPGFILE=$(mktemp) && wget -O $GPGFILE #{config.repo_gpg_key_url} && rpm --import $GPGFILE; rm -f $GPGFILE")
comm.sudo("zypper addrepo -t YUM #{config.yum_repo_url} cfengine-repository")
comm.sudo("zypper se #{config.package_name} && zypper -n install #{config.package_name}")
end
end
end
end
end
end
end

View File

@ -33,6 +33,11 @@ module VagrantPlugins
Cap::RedHat::CFEngineInstall
end
guest_capability("suse", "cfengine_install") do
require_relative "cap/suse/cfengine_install"
Cap::SuSE::CFEngineInstall
end
provisioner(:cfengine) do
require_relative "provisioner"
Provisioner