Method: Beaker::DSL::InstallUtils#install_puppet
- Defined in:
- lib/beaker/dsl/install_utils.rb
#install_puppet(opts = {}) ⇒ Object
Note:
This will attempt to add a repository for apt.puppetlabs.com on Debian, Ubuntu, or Cumulus machines, or yum.puppetlabs.com on EL or Fedora machines, then install the package ‘puppet’.
Install FOSS based upon host configuration and options
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/beaker/dsl/install_utils.rb', line 685 def install_puppet(opts = {}) default_download_url = 'http://downloads.puppetlabs.com' opts = {:win_download_url => "#{default_download_url}/windows", :mac_download_url => "#{default_download_url}/mac"}.merge(opts) hosts.each do |host| if host['platform'] =~ /el-(5|6|7)/ relver = $1 install_puppet_from_rpm host, opts.merge(:release => relver, :family => 'el') elsif host['platform'] =~ /fedora-(\d+)/ relver = $1 install_puppet_from_rpm host, opts.merge(:release => relver, :family => 'fedora') elsif host['platform'] =~ /(ubuntu|debian|cumulus)/ install_puppet_from_deb host, opts elsif host['platform'] =~ /windows/ relver = opts[:version] install_puppet_from_msi host, opts elsif host['platform'] =~ /osx/ install_puppet_from_dmg host, opts else if opts[:default_action] == 'gem_install' install_puppet_from_gem host, opts else raise "install_puppet() called for unsupported platform '#{host['platform']}' on '#{host.name}'" end end # Certain install paths may not create the config dirs/files needed on host, "mkdir -p #{host['puppetpath']}" unless host[:type] =~ /aio/ on host, "echo '' >> #{host.puppet['hiera_config']}" end nil end |