module Beaker::DSL::InstallUtils::AIODefaults
This module contains default values for aio paths and directorys per-platform
Constants
- AIO_DEFAULTS
Here be the pathing and default values for AIO installs
Public Instance Methods
Add the appropriate aio 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/aio_defaults.rb, line 60 def add_aio_defaults_on(hosts) block_on hosts do | host | if host.is_powershell? platform = 'pswindows' elsif host['platform'] =~ /windows/ if host[:ruby_arch] == 'x64' ruby_arch = /-64/ else ruby_arch = /-32/ end if host['platform'] =~ ruby_arch platform = 'windows-64' else platform = 'windows' end else platform = 'unix' end add_platform_aio_defaults(host, platform) end end
Add the appropriate aio defaults to the host object so that they can be accessed using host, set host = aio @param [Host] host A single host to act upon @param [String] platform The platform type of this host, one of 'windows', 'pswindows', or 'unix'
# File lib/beaker-puppet/install_utils/aio_defaults.rb, line 45 def add_platform_aio_defaults(host, platform) AIO_DEFAULTS[platform].each_pair do |key, val| host[key] = val end # add group and type here for backwards compatability if host['platform'] =~ /windows/ host['group'] = 'Administrators' else host['group'] = 'puppet' end end
Remove the appropriate aio 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/aio_defaults.rb, line 95 def remove_aio_defaults_on(hosts) block_on hosts do | host | if host.is_powershell? platform = 'pswindows' elsif host['platform'] =~ /windows/ platform = 'windows' else platform = 'unix' end remove_platform_aio_defaults(host, platform) end end
Remove the appropriate aio 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/aio_defaults.rb, line 85 def remove_platform_aio_defaults(host, platform) AIO_DEFAULTS[platform].each_pair do |key, val| host.delete(key) end host['group'] = nil end