diff --git a/itchef/cookbooks/fb_helpers/libraries/node_methods.rb b/itchef/cookbooks/fb_helpers/libraries/node_methods.rb index 9997ac26..c2086258 100644 --- a/itchef/cookbooks/fb_helpers/libraries/node_methods.rb +++ b/itchef/cookbooks/fb_helpers/libraries/node_methods.rb @@ -990,7 +990,7 @@ def solo? end def root_user - value_for_platform( + @root_user ||= value_for_platform( 'windows' => { 'default' => 'Administrator' }, 'default' => 'root', ) @@ -999,7 +999,7 @@ def root_user def root_group # rubocop:disable Chef/Correctness/InvalidPlatformValueForPlatformHelper # See the `macos?` method above - value_for_platform( + @root_group ||= value_for_platform( %w{openbsd freebsd mac_os_x macos} => { 'default' => 'wheel' }, 'windows' => { 'default' => 'Administrators' }, 'default' => 'root',