Skip to content

Commit 2e33e8b

Browse files
committed
(maint) Updates macOS structured facts
This commit updates the structured facts used for macOS, which previously omitted the 'macosx' level of the hash.
1 parent 163f5de commit 2e33e8b

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

manifests/osfamily/darwin.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
class puppet_agent::osfamily::darwin {
22
assert_private()
33

4-
if $facts['os']['version']['major'] =~ /^10\./ {
5-
$productversion_major = $facts['os']['version']['major']
4+
if $facts['os']['macosx']['version']['major'] =~ /^10\./ {
5+
$productversion_major = $facts['os']['macosx']['version']['major']
66
} else {
7-
$productversion_array = split($facts['os']['version']['major'], '[.]')
7+
$productversion_array = split($facts['os']['macosx']['version']['major'], '[.]')
88
$productversion_major = $productversion_array[0]
99
}
1010

spec/classes/puppet_agent_osfamily_darwin_spec.rb

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
architecture: 'x86_64',
2727
name: 'Darwin',
2828
family: 'Darwin',
29-
version: {
30-
major: '10.13',
29+
macosx: {
30+
version: {
31+
major: '10.13',
32+
},
3133
},
3234
},
3335
servername: 'master.example.vm',
@@ -50,8 +52,10 @@
5052
aio_agent_version: '1.10.99',
5153
is_pe: true,
5254
os: {
53-
version: {
54-
major: osmajor,
55+
macosx: {
56+
version: {
57+
major: osmajor,
58+
},
5559
},
5660
},
5761
platform_tag: tag,
@@ -95,8 +99,10 @@
9599
aio_agent_version: '1.10.99',
96100
is_pe: true,
97101
os: {
98-
version: {
99-
major: '10.13',
102+
macosx: {
103+
version: {
104+
major: '10.13',
105+
},
100106
},
101107
},
102108
platform_tag: 'osx-10.13-x86_64',
@@ -117,8 +123,10 @@
117123
aio_agent_version: '1.10.99',
118124
is_pe: true,
119125
os: {
120-
version: {
121-
major: '10.13',
126+
macosx: {
127+
version: {
128+
major: '10.13',
129+
},
122130
},
123131
},
124132
platform_tag: 'osx-10.13-x86_64',
@@ -140,8 +148,10 @@
140148
aio_agent_version: '1.10.99',
141149
is_pe: true,
142150
os: {
143-
version: {
144-
major: '11.2',
151+
macosx: {
152+
version: {
153+
major: '11.2',
154+
},
145155
},
146156
},
147157
platform_tag: 'osx-11-x86_64',
@@ -163,8 +173,10 @@
163173
aio_agent_version: '1.10.99',
164174
is_pe: true,
165175
os: {
166-
version: {
167-
major: '11',
176+
macosx: {
177+
version: {
178+
major: '11',
179+
},
168180
},
169181
},
170182
platform_tag: 'osx-11-x86_64',

0 commit comments

Comments
 (0)