Skip to content

Commit d2051bb

Browse files
lumarelsbernhard
authored andcommitted
Fixes #38624 - Adapt Registration Template to support OpenVox Agent
Import OpenVox GPG keys for SLES Remove non-existent Puppet GPG key
1 parent 5205ccb commit d2051bb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/views/unattended/provisioning_templates/snippet/puppet_setup.erb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ os_major = @host.operatingsystem.major.to_i
1818
os_name = @host.operatingsystem.name
1919

2020
aio_enabled = host_param_true?('enable-puppetlabs-repo') || host_param_true?('enable-official-puppet8-repo') || host_param_true?('enable-puppet8') || host_param_true?('enable-official-puppet7-repo') || host_param_true?('enable-puppet7') || host_param_true?('enable-puppetlabs-puppet6-repo') || host_param_true?('enable-puppet6') || host_param_true?('enable-puppetlabs-puppet5-repo') || host_param_true?('enable-puppet5')
21+
aio_openvox_enabled = host_param_true?('enable-openvox7') || host_param_true?('enable-openvox8')
2122

2223
if host_param('run-puppet-in-installer-tags')
2324
puppet_tags = host_param('run-puppet-in-installer-tags')
@@ -37,6 +38,10 @@ elsif aio_enabled
3738
linux_package = 'puppet-agent'
3839
etc_path = '/etc/puppetlabs/puppet'
3940
bin_path = '/opt/puppetlabs/bin'
41+
elsif aio_openvox_enabled
42+
linux_package = 'openvox-agent'
43+
etc_path = '/etc/puppetlabs/puppet'
44+
bin_path = '/opt/puppetlabs/bin'
4045
else
4146
linux_package = os_family == 'Suse' ? 'rubygem-puppet' : 'puppet'
4247
etc_path = '/etc/puppet'
@@ -55,9 +60,10 @@ else
5560
yum -t -y install <%= linux_package %>
5661
fi
5762
<% elsif os_family == 'Suse' -%>
58-
<% if host_param_true?('enable-puppetlabs-repo') || host_param_true?('enable-official-puppet8-repo') || host_param_true?('enable-official-puppet7-repo') || host_param_true?('enable-puppetlabs-puppet6-repo') || host_param_true?('enable-puppetlabs-puppet5-repo') -%>
59-
rpmkeys --import https://yum.puppet.com/RPM-GPG-KEY-puppetlabs
63+
<% if aio_enabled -%>
6064
rpmkeys --import https://yum.puppet.com/RPM-GPG-KEY-puppet
65+
<% elsif aio_openvox_enabled -%>
66+
rpmkeys --import https://yum.voxpupuli.org/GPG-KEY-openvox.pub
6167
<% end -%>
6268
<% if @host.provision_method == 'image' -%>
6369
/usr/bin/zypper -n --gpg-auto-import-keys install <%= linux_package %>
@@ -111,7 +117,7 @@ puppet_unit=puppet
111117
<% if os_family == 'Freebsd' -%>
112118
echo 'puppet_enable="YES"' >>/etc/rc.conf
113119
<% end -%>
114-
<% unless aio_enabled -%>
120+
<% unless aio_enabled || aio_openvox_enabled -%>
115121
<% if os_family == 'Debian' -%>
116122
if [ -f "/etc/default/puppet" ]
117123
then

0 commit comments

Comments
 (0)