diff --git a/manifests/osfamily/darwin.pp b/manifests/osfamily/darwin.pp index 40d45681..db989590 100644 --- a/manifests/osfamily/darwin.pp +++ b/manifests/osfamily/darwin.pp @@ -1,10 +1,10 @@ class puppet_agent::osfamily::darwin { assert_private() - if $facts['os']['version']['major'] =~ /^10\./ { - $productversion_major = $facts['os']['version']['major'] + if $facts['os']['macosx']['version']['major'] =~ /^10\./ { + $productversion_major = $facts['os']['macosx']['version']['major'] } else { - $productversion_array = split($facts['os']['version']['major'], '[.]') + $productversion_array = split($facts['os']['macosx']['version']['major'], '[.]') $productversion_major = $productversion_array[0] } diff --git a/spec/classes/puppet_agent_osfamily_darwin_spec.rb b/spec/classes/puppet_agent_osfamily_darwin_spec.rb index dfd59d8d..e6e65fb3 100644 --- a/spec/classes/puppet_agent_osfamily_darwin_spec.rb +++ b/spec/classes/puppet_agent_osfamily_darwin_spec.rb @@ -26,8 +26,10 @@ architecture: 'x86_64', name: 'Darwin', family: 'Darwin', - version: { - major: '10.13', + macosx: { + version: { + major: '10.13', + }, }, }, servername: 'master.example.vm', @@ -50,8 +52,10 @@ aio_agent_version: '1.10.99', is_pe: true, os: { - version: { - major: osmajor, + macosx: { + version: { + major: osmajor, + }, }, }, platform_tag: tag, @@ -95,8 +99,10 @@ aio_agent_version: '1.10.99', is_pe: true, os: { - version: { - major: '10.13', + macosx: { + version: { + major: '10.13', + }, }, }, platform_tag: 'osx-10.13-x86_64', @@ -117,8 +123,10 @@ aio_agent_version: '1.10.99', is_pe: true, os: { - version: { - major: '10.13', + macosx: { + version: { + major: '10.13', + }, }, }, platform_tag: 'osx-10.13-x86_64', @@ -140,8 +148,10 @@ aio_agent_version: '1.10.99', is_pe: true, os: { - version: { - major: '11.2', + macosx: { + version: { + major: '11.2', + }, }, }, platform_tag: 'osx-11-x86_64', @@ -163,8 +173,10 @@ aio_agent_version: '1.10.99', is_pe: true, os: { - version: { - major: '11', + macosx: { + version: { + major: '11', + }, }, }, platform_tag: 'osx-11-x86_64',