Revision e08c8a21
Added by Dominic Cleal over 7 years ago
app/views/unattended/autoyast/provision_sles.erb | ||
---|---|---|
<package>lsb-release</package>
|
||
<package>openssh</package>
|
||
<% if puppet_enabled -%>
|
||
<% if @host.param_true?('enable-puppetlabs-pc1-repo') -%>
|
||
<package>puppet-agent</package>
|
||
<% else -%>
|
||
<package>rubygem-puppet</package>
|
||
<% end -%>
|
||
<% end -%>
|
||
<% if salt_enabled -%>
|
||
<package>salt-minion</package>
|
||
<% end -%>
|
||
... | ... | |
<add-on>
|
||
<add_on_products config:type="list">
|
||
<% if puppet_enabled -%>
|
||
<% if @host.param_true?('enable-puppetlabs-pc1-repo') -%>
|
||
<listentry>
|
||
<media_url><![CDATA[http://yum.puppetlabs.com/sles/<%= os_major %>/PC1/<%= @host.architecture %>/]]></media_url>
|
||
<name>puppet</name>
|
||
<product>puppet</product>
|
||
<product_dir>/</product_dir>
|
||
<signature-handling>
|
||
<accept_file_without_checksum config:type="boolean">true</accept_file_without_checksum>
|
||
<accept_unsigned_file config:type="boolean">true</accept_unsigned_file>
|
||
<accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key>
|
||
</signature-handling>
|
||
</listentry>
|
||
<% else -%>
|
||
<listentry>
|
||
<media_url><![CDATA[http://download.opensuse.org/repositories/systemsmanagement:/puppet/SLE_<%= os_major %><%= sles_minor_string %>/]]></media_url>
|
||
<name>systemsmanagement_puppet</name>
|
||
... | ... | |
</listentry>
|
||
<% end -%>
|
||
<% end -%>
|
||
<% end -%>
|
||
<% if salt_enabled -%>
|
||
<listentry>
|
||
<media_url><![CDATA[http://download.opensuse.org/repositories/devel:languages:python/SLE_<%= os_major %><%= sles_minor_string %>/]]></media_url>
|
app/views/unattended/snippets/_coreos_cloudconfig.erb | ||
---|---|---|
<% if @host.params['reboot-strategy'] -%>
|
||
update:
|
||
reboot-strategy: <%= @host.params['reboot-strategy'] %>
|
||
<% else -%>
|
||
<% end -%>
|
||
<% unless @host.param_false?('enable_etcd') -%>
|
||
etcd2:
|
||
<% if @host.params['etcd_discovery_url'] -%>
|
app/views/unattended/snippets/_puppet.conf.erb | ||
---|---|---|
name: puppet.conf
|
||
%>
|
||
<%
|
||
if @host.param_true?('enable-puppetlabs-pc1-repo') && (@host.operatingsystem.family == 'Debian' || @host.operatingsystem.family == 'Redhat')
|
||
os_family = @host.operatingsystem.family
|
||
os_name = @host.operatingsystem.name
|
||
|
||
if @host.param_true?('enable-puppetlabs-pc1-repo') && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES')
|
||
var_dir = '/opt/puppetlabs/puppet/cache'
|
||
log_dir = '/var/log/puppetlabs/puppet'
|
||
run_dir = '/var/run/puppetlabs'
|
app/views/unattended/snippets/_puppet_setup.erb | ||
---|---|---|
else
|
||
yum -t -y install <%= linux_package %>
|
||
fi
|
||
<% elsif os_name == 'SLES' && @host.param_true?('enable-puppetlabs-pc1-repo') -%>
|
||
rpmkeys --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs
|
||
rpmkeys --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppet
|
||
<%= bin_path %>/puppet resource service puppet enable=true
|
||
<% end -%>
|
||
|
||
cat > <%= etc_path %>/puppet.conf << EOF
|
||
... | ... | |
<% end -%>
|
||
/sbin/chkconfig --level 345 puppet on
|
||
<% end -%>
|
||
<% if os_family == 'Freebsd' -%>
|
||
echo 'puppet_enable="YES"' >>/etc/rc.conf
|
||
<% end -%>
|
||
<% unless @host.param_true?('enable-puppetlabs-pc1-repo') -%>
|
||
<% if os_family == 'Debian' -%>
|
||
if [ -f "/etc/default/puppet" ]
|
||
... | ... | |
/bin/sed -i 's/^START=no/START=yes/' /etc/default/puppet
|
||
fi
|
||
<%= bin_path %>/puppet agent --enable
|
||
<% elsif os_family == 'Freebsd' -%>
|
||
echo 'puppet_enable="YES"' >>/etc/rc.conf
|
||
<% elsif os_family == 'Suse' -%>
|
||
if [ -f "/etc/sysconfig/puppet" ]
|
||
then
|
Also available in: Unified diff
templates - sync from community-templates