module Beaker::DSL::InstallUtils::AIODefaults
def add_aio_defaults_on(hosts)
-
hosts
(Host, Array
) -- One or more hosts to act upon,, String, Symbol
def add_aio_defaults_on(hosts) block_on hosts do | host | if host['platform'] =~ /windows/ platform = 'windows' else platform = 'unix' end add_platform_aio_defaults(host, platform) end end
def add_platform_aio_defaults(host, platform)
-
platform
(String
) -- The platform type of this host, one of windows or unix -
host
(Host
) -- A single host to act upon
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
def remove_aio_defaults_on(hosts)
-
hosts
(Host, Array
) -- One or more hosts to act upon,, String, Symbol
def remove_aio_defaults_on(hosts) block_on hosts do | host | if host['platform'] =~ /windows/ platform = 'windows' else platform = 'unix' end remove_platform_aio_defaults(host, platform) end end
def remove_platform_aio_defaults(host, platform)
-
platform
(String
) -- The platform type of this host, one of windows, pswindows, freebsd, mac & unix -
host
(Host
) -- A single host to act upon
def remove_platform_aio_defaults(host, platform) AIO_DEFAULTS[platform].each_pair do |key, val| host.delete(key) end host['group'] = nil end