add cfengine provisioner suse install support

This commit is contained in:
U-quartz\Cory 2013-09-25 20:29:25 -05:00
parent e34d436f7e
commit ecb6ebaf81
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