Showing with 33 additions and 9 deletions.
  1. +16 −1 CHANGELOG.md
  2. +1 −1 manifests/install/windows.pp
  3. +1 −0 manifests/osfamily/suse.pp
  4. +1 −1 metadata.json
  5. +5 −0 spec/classes/puppet_agent_osfamily_suse_spec.rb
  6. +5 −3 task_spec/spec/acceptance/init_spec.rb
  7. +3 −2 tasks/install_shell.sh
  8. +1 −1 tasks/run.rb
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v4.20.0](https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/v4.20.0) - 2024-05-17

[Full Changelog](https://github.com/puppetlabs/puppetlabs-puppet_agent/compare/v4.19.0...v4.20.0)

### Added

- Support rpm platforms without yum [#717](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/717) ([h0tw1r3](https://github.com/h0tw1r3))
- (PA-5319) Add RedHat 9 (Power9) to the puppet_agent module task [#715](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/715) ([skyamgarp](https://github.com/skyamgarp))

### Fixed

- puppet_agent::run: properly validate environment parameter [#714](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/714) ([bastelfreak](https://github.com/bastelfreak))
- Fix strftime() deprecation warning [#712](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/712) ([smortex](https://github.com/smortex))
- Add GPG check to SUSE repository [#709](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/709) ([mhashizume](https://github.com/mhashizume))

## [v4.19.0](https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/v4.19.0) - 2024-03-06

[Full Changelog](https://github.com/puppetlabs/puppetlabs-puppet_agent/compare/v4.18.0...v4.19.0)
Expand Down Expand Up @@ -381,7 +396,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- (MODULES-10238) Add Fedora 31 to puppet_agent module [#456](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/456) ([luchihoratiu](https://github.com/luchihoratiu))
- (MODULES-10067) enhance perl download check [#455](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/455) ([ciprianbadescu](https://github.com/ciprianbadescu))
- (maint) Merge release to master [#453](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/453) ([Dorin-Pleava](https://github.com/Dorin-Pleava))
- (MODULES-10055) fix linter-errors in puppetlabs/puppet_agent [#451](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/451) ([t-kaesser](https://github.com/t-kaesser))
- (MODULES-10055) fix linter-errors in puppetlabs/puppet_agent [#451](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/451) ([kaessert](https://github.com/kaessert))
- (maint) Updated metadata.json with support for Windows Server 2019 [#449](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/449) ([sootysec](https://github.com/sootysec))
- (MODULES-27043) Puppet agent upgrade for windows FIPS [#448](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/448) ([Dorin-Pleava](https://github.com/Dorin-Pleava))
- (MODULES-10052) parameterize WaitForExit timeout in puppet_agent install script [#436](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/436) ([lucaswyoung](https://github.com/lucaswyoung))
Expand Down
2 changes: 1 addition & 1 deletion manifests/install/windows.pp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
$_puppet_run_wait = undef
}

$_timestamp = strftime('%Y_%m_%d-%H_%M')
$_timestamp = Timestamp().strftime('%Y_%m_%d-%H_%M')
$_logfile = windows_native_path("${facts['env_temp_variable']}/puppet-${_timestamp}-installer.log")

notice ("Puppet upgrade log file at ${_logfile}")
Expand Down
1 change: 1 addition & 0 deletions manifests/osfamily/suse.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
$repo_settings = {
'name' => $repo_name,
'enabled' => '1',
'gpgcheck' => '1',
'autorefresh' => '0',
'baseurl' => "${source}?ssl_verify=no",
'type' => 'rpm-md',
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-puppet_agent",
"version": "4.19.0",
"version": "4.20.0",
"author": "puppetlabs",
"summary": "Upgrades All-In-One Puppet Agents",
"license": "Apache-2.0",
Expand Down
5 changes: 5 additions & 0 deletions spec/classes/puppet_agent_osfamily_suse_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
{
'name' => 'pc_repo',
'enabled' => '1',
'gpgcheck' => '1',
'autorefresh' => '0',
'baseurl' => "http://yum.puppet.com/puppet6/sles/#{os_version}/x86_64?ssl_verify=no",
'type' => 'rpm-md',
Expand Down Expand Up @@ -177,6 +178,7 @@
[
'name',
'enabled',
'gpgcheck',
'autorefresh',
'baseurl',
'type',
Expand Down Expand Up @@ -287,6 +289,7 @@
{
'name' => 'pc_repo',
'enabled' => '1',
'gpgcheck' => '1',
'autorefresh' => '0',
'baseurl' => "https://master.example.vm:8140/packages/2000.0.0/sles-#{os_version}-x86_64?ssl_verify=no",
'type' => 'rpm-md',
Expand Down Expand Up @@ -314,6 +317,7 @@
[
'name',
'enabled',
'gpgcheck',
'autorefresh',
'baseurl',
'type',
Expand Down Expand Up @@ -359,6 +363,7 @@
[
'name',
'enabled',
'gpgcheck',
'autorefresh',
'baseurl',
'type',
Expand Down
8 changes: 5 additions & 3 deletions task_spec/spec/acceptance/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def latest_platform_list
ubuntu-22\.04-aarch64|
amazon-2023|
osx-14|
debian-12
debian-12|
debian-11-aarch64|
el-9-ppc64le
}x
end

Expand All @@ -57,7 +59,7 @@ def latest_platform_list
# official packages won't be released until later. During the N+1 release, you'll
# want to change `target_platform` to be the first version (N) that added the OS.
puppet_7_version = case target_platform
when %r{debian-11}
when %r{debian-11-amd64}
'7.9.0'
when %r{el-9-x86_64}
'7.14.0'
Expand Down Expand Up @@ -102,7 +104,7 @@ def latest_platform_list
# true
# end
multiple_puppet7_versions = case target_platform
when %r{osx-13|osx-14|el-9-aarch64}
when %r{osx-13|osx-14|el-9-aarch64|debian-11-aarch64|el-9-ppc64le}
false
else
true
Expand Down
5 changes: 3 additions & 2 deletions tasks/install_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,11 @@ install_file() {
fi

rpm -Uvh --oldpackage --replacepkgs "$2"
exists dnf && PKGCMD=dnf || PKGCMD=yum
if test "$version" = 'latest'; then
run_cmd "yum install -y puppet-agent && yum upgrade -y puppet-agent"
run_cmd "${PKGCMD} install -y puppet-agent && ${PKGCMD} upgrade -y puppet-agent"
else
run_cmd "yum install -y 'puppet-agent-${puppet_agent_version}'"
run_cmd "${PKGCMD} install -y 'puppet-agent-${puppet_agent_version}'"
fi
;;
"noarch.rpm")
Expand Down
2 changes: 1 addition & 1 deletion tasks/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def noop(params)
end

def environment(params)
(params['environment'].length > 1) ? "--environment=#{params['environment']}" : ''
(params['environment'] && !params['environment'].empty?) ? "--environment=#{params['environment']}" : ''
end

# Attempts to run the Puppet agent, returning the mtime for the last run report
Expand Down