Skip to content

Commit

Permalink
Fixes #37870 - Auto-import new GPG keys on SLES
Browse files Browse the repository at this point in the history
  • Loading branch information
tux93 authored and sbernhard committed Oct 7, 2024
1 parent 13bdb7f commit 699995e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def install_packages(packages)
<<~CMD
#{banner}
zypper refresh
zypper -n install #{packages}
zypper -n --gpg-auto-import-keys install #{packages}
CMD
else
raise UnsupportedOS.new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rpmkeys --import https://yum.puppet.com/RPM-GPG-KEY-puppetlabs
rpmkeys --import https://yum.puppet.com/RPM-GPG-KEY-puppet
<% end -%>
<% if @host.provision_method == 'image' -%>
/usr/bin/zypper -n install <%= linux_package %>
/usr/bin/zypper -n --gpg-auto-import-keys install <%= linux_package %>
<% end -%>
<% elsif os_family == 'Windows' -%>
$puppet_agent_msi = "${env:TEMP}\<%= windows_package %>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else
yum -t -y install salt-minion
fi
<% elsif @host.operatingsystem.family == 'Suse' -%>
/usr/bin/zypper -n install salt-minion
/usr/bin/zypper -n --gpg-auto-import-keys install salt-minion
<% end -%>

cat > <%= etc_path %>/minion.d/minion.conf << EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def host_info
@scope.instance_variable_set('@host', host)
command = @scope.install_packages('pkg1')

assert_includes command, 'zypper -n install pkg1'
assert_includes command, 'zypper -n --gpg-auto-import-keys install pkg1'
end
end

Expand Down

0 comments on commit 699995e

Please sign in to comment.