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:
commit
d052069eb7
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue