Sha256: a287df9471ecc387e3f08b9f61b77b20b26b3b7426e57ef77aaa277c899086d6

Contents?: true

Size: 1.02 KB

Versions: 11

Compression:

Stored size: 1.02 KB

Contents

require "log4r"

module VagrantPlugins
  module CFEngine
    module Cap
      module RedHat
        module CFEngineInstall
          def self.cfengine_install(machine, config)
            logger = Log4r::Logger.new("vagrant::plugins::cfengine::cap_redhat_cfengine_install")

            machine.communicate.tap do |comm|
              logger.info("Adding the CFEngine repository to #{config.yum_repo_file}")
              comm.sudo("mkdir -p #{File.dirname(config.yum_repo_file)} && (echo '[cfengine-repository]'; echo 'name=CFEngine Community Yum Repository'; echo 'baseurl=#{config.yum_repo_url}'; echo 'enabled=1'; echo 'gpgcheck=1') > #{config.yum_repo_file}")
              logger.info("Installing CFEngine Community Yum Repository GPG KEY from #{config.repo_gpg_key_url}")
              comm.sudo("GPGFILE=$(mktemp) && wget -O $GPGFILE #{config.repo_gpg_key_url} && rpm --import $GPGFILE; rm -f $GPGFILE")

              comm.sudo("yum -y install #{config.package_name}")
            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 8 versions & 4 rubygems

Version Path
tamtam-vagrant-reload-1.1.3 vendor/cache/vagrant-0ac2a8738841/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
tamtam-vagrant-reload-1.1.2 vendor/cache/vagrant-0ac2a8738841/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
tamtam-vagrant-reload-1.1.1 vendor/cache/vagrant-0ac2a8738841/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
tamtam-vagrant-reload-1.1 vendor/cache/vagrant-0ac2a8738841/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-272fb27e0536/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/bundler/gems/vagrant-1e28f1ac31e7/plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
tnargav-1.3.6 plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb
tnargav-1.3.3 plugins/provisioners/cfengine/cap/redhat/cfengine_install.rb