File tree 3 files changed +14
-7
lines changed
3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 35
35
if $puppet_agent::collection and $puppet_agent::collection =~ /core/ and $facts [' os' ][' family' ] =~ /windows/ {
36
36
$download_username = getvar(' puppet_agent::username' , ' forge-key' )
37
37
$download_password = unwrap(getvar(' puppet_agent::password' ))
38
+ $dev = count(split($puppet_agent::prepare::package_version , ' \. ' )) > 3
38
39
39
40
$_download_puppet = windows_native_path(" ${facts['env_temp_variable']}/download_puppet.ps1" )
40
41
file { $_download_puppet:
Original file line number Diff line number Diff line change @@ -124,9 +124,14 @@ if (($collection -like '*nightly*') -And -Not ($PSBoundParameters.ContainsKey('w
124
124
125
125
if ($absolute_source ) {
126
126
$msi_source = " $absolute_source "
127
- }
128
- elseif ($collection -like ' *puppetcore*' ) {
129
- $msi_source = " ${windows_source} ?version=${version} &os_name=windows&os_version=${major_os_version} &os_arch=${arch} &fips=${fips} "
127
+ } elseif ($collection -like ' *puppetcore*' ) {
128
+ # dev param is case-sensitive, so don't use $True
129
+ if (($version -split ' \.' ).count -gt 3 ) {
130
+ $dev = ' &dev=true'
131
+ } else {
132
+ $dev = ' '
133
+ }
134
+ $msi_source = " ${windows_source} ?version=${version} &os_name=windows&os_version=${major_os_version} &os_arch=${arch} &fips=${fips}${dev} "
130
135
} else {
131
136
$msi_source = " $windows_source /windows/${collection} /${msi_name} "
132
137
}
Original file line number Diff line number Diff line change 1
1
$body = @{
2
- "version" = "<%= $puppet_agent::prepare::package_version %>"
3
- "os_name" = "<%= $facts['os']['family'] %>"
2
+ "version" = "<%= $puppet_agent::prepare::package_version %>"
3
+ "dev" = "<%= $puppet_agent::prepare::package::dev %>"
4
+ "os_name" = "<%= $facts['os']['family'] %>"
4
5
"os_version" = "<%= $facts['os']['release']['major'] %>"
5
- "os_arch" = "<%= $facts['os']['architecture'] %>"
6
- "fips" = "<%= $facts['fips_enabled'] %>"
6
+ "os_arch" = "<%= $facts['os']['architecture'] %>"
7
+ "fips" = "<%= $facts['fips_enabled'] %>"
7
8
}
8
9
$username = "<%= $puppet_agent::prepare::package::download_username %>"
9
10
$password = ConvertTo-SecureString "<%= $puppet_agent::prepare::package::download_password %>" -AsPlainText -Force
You can’t perform that action at this time.
0 commit comments