module Beaker::DSL::InstallUtils::FOSSDefaults
This module contains default values for FOSS puppet paths and directorys per-platform
Constants
- FOSS_DEFAULTS
Here be the pathing and default values for FOSS installs
- FOSS_DEFAULT_DOWNLOAD_URLS
Here be the default download URLs
Public Instance Methods
Add the appropriate foss 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-puppet/install_utils/foss_defaults.rb, line 156 def add_foss_defaults_on(hosts) block_on hosts do | host | case host.class.to_s.downcase when /aix|unix/ platform = 'unix' when /freebsd/ platform = 'freebsd' when /openbsd/ platform = 'openbsd' when /mac/ platform = 'mac' when /pswindows/ platform = 'pswindows' when /archlinux/ platform = 'archlinux' else platform = 'windows' end add_platform_foss_defaults(host, platform) end end
Add the appropriate foss defaults to the host object so that they can be accessed using host, set host = foss @param [Host] host A single host to act upon @param [String] platform The platform type of this host, one of windows, pswindows, freebsd, mac & unix
# File lib/beaker-puppet/install_utils/foss_defaults.rb, line 140 def add_platform_foss_defaults(host, platform) FOSS_DEFAULTS[platform].each_pair do |key, val| host[key] = val end # add the group and type for backwards compatability if host['platform'] =~ /windows/ host['group'] = 'Administrators' else host['group'] = 'puppet' end host['type'] = 'foss' end
Remove the appropriate foss 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-puppet/install_utils/foss_defaults.rb, line 192 def remove_foss_defaults_on(hosts) block_on hosts do | host | case host.class.to_s.downcase when /aix|unix/ platform = 'unix' when /freebsd/ platform = 'freebsd' when /openbsd/ platform = 'openbsd' when /mac/ platform = 'mac' when /pswindows/ platform = 'pswindows' else platform = 'windows' end remove_platform_foss_defaults(host, platform) end end
Remove the appropriate foss 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, pswindows, freebsd, mac & unix
# File lib/beaker-puppet/install_utils/foss_defaults.rb, line 181 def remove_platform_foss_defaults(host, platform) FOSS_DEFAULTS[platform].each_pair do |key, val| host.delete(key) end host['group'] = nil host['type'] = nil end