module Beaker::DSL::InstallUtils::PEDefaults
This module contains default values for pe paths and directorys per-platform
Constants
- PE_DEFAULTS
Here be the pathing and default values for
PE
installs
Public Instance Methods
Add the appropriate pe defaults to an array of hosts @param [Host, Array<Host>, String, Symbol] hosts One or more hosts to act upon,
or a role (String or Symbol) that identifies one or more hosts.
# File lib/beaker-pe/install/pe_defaults.rb, line 93 def add_pe_defaults_on(hosts) block_on hosts do | host | case host.class.to_s.downcase when /aix|(free|open)bsd|unix/ platform = 'unix' when /mac/ platform = 'mac' when /pswindows/ platform = 'pswindows' else platform = 'windows' end add_platform_pe_defaults(host, platform) end end
Add the appropriate pe defaults to the host object so that they can be accessed using host, set host = pe @param [Host] host A single host to act upon @param [String] platform The platform type of this host, one of windows, pswindows, mac & unix
# File lib/beaker-pe/install/pe_defaults.rb, line 71 def add_platform_pe_defaults(host, platform) PE_DEFAULTS[platform].each_pair do |key, val| host[key] = val end # add the type and group here for backwards compatability if host['platform'] =~ /windows/ host['group'] = 'Administrators' else host['group'] = 'pe-puppet' end host['type'] = 'pe' # older pe requires a different puppetservice name, set it here on the master if host['roles'].include?('master') if host['pe_ver'] and (version_is_less(host['pe_ver'], '3.4')) host['puppetservice'] = 'pe-httpd' end end end
Remove the appropriate pe defaults from an array of hosts @param [Host, Array<Host>, String, Symbol] hosts One or more hosts to act upon,
or a role (String or Symbol) that identifies one or more hosts.
# File lib/beaker-pe/install/pe_defaults.rb, line 123 def remove_pe_defaults_on(hosts) block_on hosts do | host | case host.class.to_s.downcase when /aix|(free|open)bsd|unix/ platform = 'unix' when /mac/ platform = 'mac' when /pswindows/ platform = 'pswindows' else platform = 'windows' end remove_platform_pe_defaults(host, platform) end end
Remove the appropriate pe defaults from the host object so that they can no longer be accessed using host, set host = nil @param [Host] host A single host to act upon @param [String] platform The platform type of this host, one of windows, freebsd, mac & unix
# File lib/beaker-pe/install/pe_defaults.rb, line 112 def remove_platform_pe_defaults(host, platform) PE_DEFAULTS[platform].each_pair do |key, val| host.delete(key) end host['group'] = nil host['type'] = nil end