foreman_puppet 5.1.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/foreman_puppet/extensions/host.rb +1 -1
- data/app/views/foreman_puppet/environments/welcome.html.erb +5 -0
- data/app/views/foreman_puppet/puppetclass_lookup_keys/welcome.html.erb +1 -1
- data/app/views/foreman_puppet/puppetclasses/_selected_classes.html.erb +1 -1
- data/app/views/hosts/select_multiple_puppet_proxy.html.erb +5 -0
- data/app/views/provisioning_templates/temp/autoyast_orcharhino_finish.erb +31 -0
- data/app/views/provisioning_templates/temp/preseed_orcharhino_finish.erb +90 -0
- data/app/views/provisioning_templates/temp/provision/autoyast_orcharhino_default.erb +336 -0
- data/app/views/provisioning_templates/temp/snippet/_or_al_client.erb +32 -0
- data/app/views/provisioning_templates/temp/snippet/_or_deb_client.erb +175 -0
- data/app/views/provisioning_templates/temp/snippet/_or_ol_client.erb +37 -0
- data/app/views/provisioning_templates/temp/snippet/_or_sles_client.erb +85 -0
- data/lib/foreman_puppet/version.rb +1 -1
- data/locale/ca/foreman_puppet.edit.po +243 -167
- data/locale/cs_CZ/foreman_puppet.edit.po +224 -175
- data/locale/de/foreman_puppet.edit.po +339 -220
- data/locale/en/foreman_puppet.edit.po +89 -229
- data/locale/en_GB/foreman_puppet.edit.po +210 -166
- data/locale/es/foreman_puppet.edit.po +333 -223
- data/locale/fr/foreman_puppet.edit.po +339 -236
- data/locale/gl/foreman_puppet.edit.po +216 -155
- data/locale/it/foreman_puppet.edit.po +262 -185
- data/locale/ja/foreman_puppet.edit.po +247 -201
- data/locale/ko/foreman_puppet.edit.po +213 -171
- data/locale/messages.mo +0 -0
- data/locale/nl_NL/foreman_puppet.edit.po +249 -168
- data/locale/pl/foreman_puppet.edit.po +267 -175
- data/locale/pt_BR/foreman_puppet.edit.po +345 -227
- data/locale/ru/foreman_puppet.edit.po +268 -191
- data/locale/sv_SE/foreman_puppet.edit.po +215 -156
- data/locale/zh_CN/foreman_puppet.edit.po +237 -202
- data/locale/zh_TW/foreman_puppet.edit.po +213 -173
- data/webpack/src/Components/Environments/Welcome.js +1 -1
- metadata +69 -61
- data/locale/ka/foreman_puppet.edit.po +0 -1177
- /data/locale/{ka/foreman_puppet.po.time_stamp → en/foreman_puppet.pox} +0 -0
@@ -0,0 +1,175 @@
|
|
1
|
+
<%#
|
2
|
+
kind: snippet
|
3
|
+
name: or_deb_client
|
4
|
+
model: ProvisioningTemplate
|
5
|
+
snippet: true
|
6
|
+
description: template for debian provisioning
|
7
|
+
%>
|
8
|
+
<%
|
9
|
+
content_facet = host_content_facet(@host)
|
10
|
+
apt_run = 'apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"'
|
11
|
+
apt_install = apt_run + ' -y install'
|
12
|
+
apt_upgrade = apt_run + ' -o APT::Get::Upgrade-Allow-New="true" -y upgrade'
|
13
|
+
apt_update = 'apt-get -y update'
|
14
|
+
|
15
|
+
if !host_param("or_client_repo_url").nil?
|
16
|
+
or_client_repo_url = host_param("or_client_repo_url")
|
17
|
+
elsif !host_param("or_#{@host.operatingsystem.name.downcase}_client_repo_prefix").nil?
|
18
|
+
or_client_repo_url = host_param("or_#{@host.operatingsystem.name.downcase}_client_repo_prefix") + @host.operatingsystem.major.gsub('.', '_')
|
19
|
+
else
|
20
|
+
or_client_repo_url = nil
|
21
|
+
end
|
22
|
+
if content_facet && content_facet.content_source_name
|
23
|
+
host_content_fqdn = content_facet.content_source_name
|
24
|
+
host_content_url = "https://"+content_facet.content_source_name
|
25
|
+
else
|
26
|
+
host_content_fqdn = foreman_server_fqdn
|
27
|
+
host_content_url = foreman_server_url
|
28
|
+
end
|
29
|
+
if !host_param('http-proxy').nil?
|
30
|
+
http_proxy = host_param('http-proxy')
|
31
|
+
if !host_param('http-proxy-port').nil?
|
32
|
+
http_proxy_port = host_param('http-proxy-port')
|
33
|
+
else
|
34
|
+
http_proxy_port = "3129"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
if !host_param('http-proxy-user').nil? && !host_param('http-proxy-password').nil?
|
38
|
+
http_proxy_user = host_param('http-proxy-user')
|
39
|
+
http_proxy_password = host_param('http-proxy-password')
|
40
|
+
proxy_uri = http_proxy ? "http://#{http_proxy_user}:#{http_proxy_password}@#{http_proxy}:#{http_proxy_port}" : nil
|
41
|
+
else
|
42
|
+
proxy_uri = http_proxy ? "http://#{http_proxy}:#{http_proxy_port}" : nil
|
43
|
+
end
|
44
|
+
|
45
|
+
use_trusted_gpg_d =
|
46
|
+
if @host.operatingsystem.name == 'Debian' && @host.operatingsystem.major.to_i >= 11
|
47
|
+
true
|
48
|
+
elsif @host.operatingsystem.name == 'Ubuntu' && @host.operatingsystem.major.split('.')[0].to_i >= 22
|
49
|
+
true
|
50
|
+
else
|
51
|
+
false
|
52
|
+
end
|
53
|
+
%>
|
54
|
+
|
55
|
+
<%- if @host.operatingsystem.family == 'Debian' -%>
|
56
|
+
echo "Installing or_deb_client repository"
|
57
|
+
|
58
|
+
<%- if or_client_repo_url.nil? -%>
|
59
|
+
echo "================================= Warning ============================================="
|
60
|
+
echo "Warning: To provision Debian clients, you need to prepare an 'or_deb_client'-repository"
|
61
|
+
echo " and write it's location in the global parameter 'or_<%= @host.operatingsystem.name.downcase %>_client_repo_prefix'."
|
62
|
+
echo "================================= Warning ============================================="
|
63
|
+
<%- end -%>
|
64
|
+
|
65
|
+
<%- if !content_facet || !content_facet.content_source_name -%>
|
66
|
+
echo "================================= Warning ============================================="
|
67
|
+
echo " No content source found. Setting default to <%= foreman_server_fqdn %>"
|
68
|
+
echo "================================= Warning ============================================="
|
69
|
+
<%- end -%>
|
70
|
+
|
71
|
+
|
72
|
+
<% if proxy_uri -%>
|
73
|
+
# Add http proxy to apt
|
74
|
+
echo 'Acquire::http::Proxy "<%= proxy_uri %>";' >> /etc/apt/apt.conf.d/proxy.conf
|
75
|
+
echo 'Acquire::http::Proxy::<%= @preseed_server.split(":")[0] %> "DIRECT";' >> /etc/apt/apt.conf.d/proxy.conf
|
76
|
+
|
77
|
+
# Add http proxy to wget
|
78
|
+
echo 'use_proxy=yes' >> /etc/wgetrc
|
79
|
+
echo 'http_proxy=<%= proxy_uri %>' >> /etc/wgetrc
|
80
|
+
echo 'https_proxy=<%= proxy_uri %>' >> /etc/wgetrc
|
81
|
+
<% end -%>
|
82
|
+
|
83
|
+
<% if @host.operatingsystem.name == 'Ubuntu' -%>
|
84
|
+
# Disable Phased-Updates for Ubuntu
|
85
|
+
cat << EOF >/etc/apt/apt.conf.d/98phased-updates
|
86
|
+
APT::Get::Always-Include-Phased-Updates "true";
|
87
|
+
EOF
|
88
|
+
<% end -%>
|
89
|
+
|
90
|
+
echo "Ensure gnupg is installed, which is needed for interacting with 'apt-key'"
|
91
|
+
<%= apt_update %>
|
92
|
+
<%= apt_install %> gnupg
|
93
|
+
|
94
|
+
echo "Install orcharhino repositories"
|
95
|
+
mkdir -p /etc/apt/sources.list.d
|
96
|
+
|
97
|
+
<% if use_trusted_gpg_d %>
|
98
|
+
mkdir -p /etc/apt/trusted.gpg.d
|
99
|
+
wget "http://<%= host_content_fqdn %>/pub/pulp_deb_signing.key" -O - | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/orcharhino_<%= host_content_fqdn %>.gpg --import
|
100
|
+
chmod 644 /etc/apt/trusted.gpg.d/orcharhino_<%= host_content_fqdn %>.gpg
|
101
|
+
<% # looks like gpg creates this file automatically and there is no option to prevent gpg to create this backup file -%>
|
102
|
+
rm -f /etc/apt/trusted.gpg.d/orcharhino_<%= host_content_fqdn %>.gpg~
|
103
|
+
<% else %>
|
104
|
+
wget "http://<%= host_content_fqdn %>/pub/pulp_deb_signing.key" -O - | apt-key add -
|
105
|
+
<% end %>
|
106
|
+
|
107
|
+
<%- if host_param('kt_activation_keys') -%>
|
108
|
+
|
109
|
+
cat > /etc/apt/sources.list.d/orcharhino.list <<'EOF'
|
110
|
+
# This File is automatically generated.
|
111
|
+
# !!! Do not edit !!!
|
112
|
+
|
113
|
+
deb <%= or_client_repo_url %> default all
|
114
|
+
EOF
|
115
|
+
|
116
|
+
<%= apt_update %>
|
117
|
+
<%= apt_install %> apt-transport-katello katello-upload-profile
|
118
|
+
|
119
|
+
echo "Remove all repositories from /etc/apt/sources.list{,.d/*}"
|
120
|
+
cat > /etc/apt/sources.list <<'EOF'
|
121
|
+
# This system is managed by orcharhino
|
122
|
+
EOF
|
123
|
+
|
124
|
+
find /etc/apt/sources.list.d -type f -print0 | xargs -r0 rm
|
125
|
+
|
126
|
+
echo "Registering the System"
|
127
|
+
wget --no-check-certificate -O - <%= host_content_url %>/pub/katello-rhsm-consumer | /bin/bash -x 2> /root/katello-rhsm-consumer.log
|
128
|
+
|
129
|
+
<% if http_proxy %>
|
130
|
+
subscription-manager config --server.proxy_hostname='<%= http_proxy %>'
|
131
|
+
<% if http_proxy_user %>
|
132
|
+
subscription-manager config --server.proxy_user='<%= http_proxy_user %>'
|
133
|
+
<% end %>
|
134
|
+
<% if http_proxy_password %>
|
135
|
+
subscription-manager config --server.proxy_password='<%= http_proxy_password %>'
|
136
|
+
<% end %>
|
137
|
+
subscription-manager config --server.proxy_port='<%= http_proxy_port %>'
|
138
|
+
<% end %>
|
139
|
+
|
140
|
+
subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= host_param('kt_activation_keys') %>"
|
141
|
+
|
142
|
+
# Update the package lists
|
143
|
+
<%= apt_update %>
|
144
|
+
|
145
|
+
# Install katello host tools and tracer
|
146
|
+
if dpkg -l python3-subscription-manager >/dev/null 2>&1; then
|
147
|
+
<%= apt_install %> python3-katello-host-tools python3-katello-host-tools-tracer
|
148
|
+
else
|
149
|
+
<%= apt_install %> python-katello-host-tools python-katello-host-tools-tracer
|
150
|
+
fi
|
151
|
+
|
152
|
+
<% unless host_param_false?('package_upgrade') -%>
|
153
|
+
# update all the base packages from the updates repository
|
154
|
+
<%= apt_upgrade %>
|
155
|
+
<% end -%>
|
156
|
+
<%- else -%>
|
157
|
+
|
158
|
+
cat > /etc/apt/sources.list.d/orcharhino.list <<'EOF'
|
159
|
+
# This File is automatically generated.
|
160
|
+
# !!! Do not edit !!!
|
161
|
+
<%-
|
162
|
+
i=1
|
163
|
+
while host_param('or_deb_repo_%i' % (i))
|
164
|
+
-%>
|
165
|
+
deb http://<%= host_content_fqdn %>/<%= host_param('or_deb_repo_%i' % (i)) %>
|
166
|
+
<%-
|
167
|
+
i = i + 1
|
168
|
+
end
|
169
|
+
-%>
|
170
|
+
EOF
|
171
|
+
|
172
|
+
<%- end -%>
|
173
|
+
<%- else -%>
|
174
|
+
echo "Warning! This should only be used on Debian OSes."
|
175
|
+
<%- end -%>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%#
|
2
|
+
kind: snippet
|
3
|
+
name: or_ol_client
|
4
|
+
model: ProvisioningTemplate
|
5
|
+
snippet: true
|
6
|
+
description: This snippet prepares the registration to orcharhino on a OracleLinux host
|
7
|
+
-%>
|
8
|
+
<%-
|
9
|
+
os_major = @host.operatingsystem.major.to_i
|
10
|
+
|
11
|
+
if !host_param('or_client_repo_url').nil?
|
12
|
+
or_client_repo_url = host_param('or_client_repo_url')
|
13
|
+
elsif !host_param('or_oraclelinux_client_repo_prefix').nil?
|
14
|
+
or_client_repo_url = host_param('or_oraclelinux_client_repo_prefix') + os_major.to_s
|
15
|
+
else
|
16
|
+
or_client_repo_url = nil
|
17
|
+
end
|
18
|
+
%>
|
19
|
+
<%- if !or_client_repo_url.nil? %>
|
20
|
+
# Install dependencies which are required later on while installing the subscription-manager
|
21
|
+
yum install -y python-inotify python-setuptools
|
22
|
+
|
23
|
+
cat << EOF > /etc/yum.repos.d/or_ol_client.repo
|
24
|
+
[orcharhino_OracleLinux_Client_<%= os_major %>]
|
25
|
+
name=orcharhino Oracle Linux Client
|
26
|
+
baseurl="<%= or_client_repo_url %>"
|
27
|
+
gpgcheck=0
|
28
|
+
enabled=1
|
29
|
+
priority=5
|
30
|
+
EOF
|
31
|
+
|
32
|
+
<%- if os_major == 7 %>
|
33
|
+
# Remove oracle's rhn-client-tools which blocks the installation of our subscription-manager
|
34
|
+
yum remove -y rhn-client-tools
|
35
|
+
<%- end %>
|
36
|
+
|
37
|
+
<%- end %>
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<%#
|
2
|
+
kind: snippet
|
3
|
+
name: or_sles_client
|
4
|
+
model: ProvisioningTemplate
|
5
|
+
snippet: true
|
6
|
+
description: this snippet will start a script to register SUSE machines with orcharhino
|
7
|
+
%>
|
8
|
+
<%
|
9
|
+
os_major = @host.operatingsystem.major.to_i
|
10
|
+
os_minor = @host.operatingsystem.minor.to_i
|
11
|
+
pm_set = @host.puppet_server.present?
|
12
|
+
aio_enabled = host_param_true?('enable-puppetlabs-puppet7-repo') || host_param_true?('enable-puppetlabs-puppet5-repo') || host_param_true?('enable-puppetlabs-puppet6-repo') || host_param_true?('enable-puppetlabs-pc1-repo') || host_param_true?('enable-puppet5') || host_param_true?('enable-puppet6') || host_param_true?('enable-puppet7')
|
13
|
+
puppet_enabled = pm_set || host_param_true?('force-puppet')
|
14
|
+
use_sles_client_v2 = host_param_true?('use-sles-client-v2')
|
15
|
+
salt_enabled = host_param('salt_master').present?
|
16
|
+
sles_minor_string = (os_minor == 0) ? '' : "SP#{os_minor}"
|
17
|
+
|
18
|
+
if use_sles_client_v2
|
19
|
+
katello_client_tool = "katello-host-tools"
|
20
|
+
if os_major >= 15
|
21
|
+
katello_client_tool += " katello-host-tools-tracer"
|
22
|
+
end
|
23
|
+
else
|
24
|
+
katello_client_tool = "katello-agent"
|
25
|
+
end
|
26
|
+
|
27
|
+
additional_pkgs=""
|
28
|
+
if os_major < 12
|
29
|
+
additional_pkgs="libnl3"
|
30
|
+
end
|
31
|
+
%>
|
32
|
+
|
33
|
+
<%- if host_param('kt_activation_keys') -%>
|
34
|
+
<%- if @host.operatingsystem.family == 'Suse' -%>
|
35
|
+
echo "Installing or_sles_client repository"
|
36
|
+
<%- if host_param('or_sles_client_repo_prefix').nil? and host_param('or_client_repo_url').nil? -%>
|
37
|
+
echo "================================ Warning ============================================="
|
38
|
+
echo "Warning: To provision SLES clients, you need to prepare an 'or_sles_client'-repository"
|
39
|
+
echo " and write it's location in the operatingsystem parameter 'or_client_repo_url'."
|
40
|
+
echo "================================ Warning ============================================="
|
41
|
+
<%- end -%>
|
42
|
+
<%- if host_param('or_client_repo_url').nil? -%>
|
43
|
+
zypper addrepo -G --check "<%= host_param('or_sles_client_repo_prefix') %><%= os_major %><%= sles_minor_string %>" or_sles_client
|
44
|
+
<%- else -%>
|
45
|
+
zypper addrepo -G --check "<%= host_param('or_client_repo_url') %>" or_sles_client
|
46
|
+
<%- end -%>
|
47
|
+
zypper -n update
|
48
|
+
zypper --non-interactive --no-gpg-checks --quiet install --auto-agree-with-licenses subscription-manager <%= additional_pkgs %>
|
49
|
+
<%- unless use_sles_client_v2 -%>
|
50
|
+
zypper --non-interactive --no-gpg-checks --quiet install --auto-agree-with-licenses or-sles-client
|
51
|
+
<%- end -%>
|
52
|
+
|
53
|
+
<%- if os_major < 12 -%>
|
54
|
+
curl -s <%= subscription_manager_configuration_url(@host, false) %> | bash
|
55
|
+
<%- else -%>
|
56
|
+
rpm -ivh <%= subscription_manager_configuration_url(@host) %>
|
57
|
+
<%- end -%>
|
58
|
+
echo "Registering the System"
|
59
|
+
subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= host_param('kt_activation_keys') %>"
|
60
|
+
<% unless host_param_false?('package_upgrade') -%>
|
61
|
+
# update all the base packages from the updates repository
|
62
|
+
zypper -n update
|
63
|
+
<% end -%>
|
64
|
+
echo "Installing katello client"
|
65
|
+
zypper --non-interactive --no-gpg-checks --quiet install --auto-agree-with-licenses <%= katello_client_tool %>
|
66
|
+
|
67
|
+
<%- unless use_sles_client_v2 -%>
|
68
|
+
chkconfig goferd on
|
69
|
+
<%- end -%>
|
70
|
+
subscription-manager refresh
|
71
|
+
|
72
|
+
<% if puppet_enabled -%>
|
73
|
+
<% if aio_enabled -%>
|
74
|
+
/usr/bin/zypper -n install puppet-agent
|
75
|
+
<% else -%>
|
76
|
+
/usr/bin/zypper -n install rubygem-puppet
|
77
|
+
<% end -%>
|
78
|
+
<% end -%>
|
79
|
+
<% if salt_enabled -%>
|
80
|
+
/usr/bin/zypper -n install salt-minion
|
81
|
+
<% end -%>
|
82
|
+
<%- else -%>
|
83
|
+
echo "Warning! This should only be used on Suse OSes."
|
84
|
+
<%- end -%>
|
85
|
+
<%- end -%>
|