Sha256: 8b869d9c2474528aa526580be85e3817547face1a16a640dcefacfbff89e9c0d

Contents?: true

Size: 1.95 KB

Versions: 7

Compression:

Stored size: 1.95 KB

Contents

<%#
kind: finish
name: Katello Kickstart default finish
oses:
- CentOS 5
- CentOS 6
- CentOS 7
- RedHat 5
- RedHat 6
- RedHat 7
- Fedora 19
- Fedora 20
%>
<% if @host.subnet.respond_to?(:dhcp_boot_mode?) -%>
<%= snippet 'kickstart_networking_setup' %>
service network restart
<% end -%>

<%
  rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name != 'Fedora'
  os_major = @host.operatingsystem.major.to_i
  pm_set = @host.puppetmaster.empty? ? false : true
  puppet_enabled = pm_set || @host.params['force-puppet']
  salt_enabled = @host.params['salt_master'] ? true : false
%>

<%= snippet "subscription_manager_registration" %>

<% if @host.respond_to?(:realm) && @host.otp && @host.realm && @host.realm.realm_type == "FreeIPA" -%>
<%= snippet "freeipa_register" %>
<% end -%>

# update local time
echo "updating system time"
/usr/sbin/ntpdate -sub <%= @host.params['ntp-server'] || '0.fedora.pool.ntp.org' %>
/usr/sbin/hwclock --systohc

<% if @host.info['parameters']['realm'] && @host.realm && @host.realm.realm_type == 'FreeIPA' -%>
<%= snippet "freeipa_register" %>
<% end -%>

# update all the base packages from the updates repository
yum -t -y -e 0 update

<% if salt_enabled %>
yum -t -y -e 0 install salt-minion
cat > /etc/salt/minion << EOF
<%= snippet 'saltstack_minion' %>
EOF
# Setup salt-minion to run on system reboot
/sbin/chkconfig --level 345 salt-minion on
# Running salt-call to trigger key signing
salt-call --no-color --grains >/dev/null
<% end -%>

<% if puppet_enabled %>
yum -t -y -e 0 install puppet
echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

<%= snippet('remote_execution_ssh_keys') %>

# Setup puppet to run on system reboot
/sbin/chkconfig --level 345 puppet on

/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag <%= @host.puppetmaster.blank? ? '' : "--server #{@host.puppetmaster}" %> --no-daemonize
/sbin/service puppet start
<% end -%>

exit 0

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
katello-3.0.2 app/views/foreman/unattended/finish-katello.erb
katello-3.0.1 app/views/foreman/unattended/finish-katello.erb
katello-3.0.0 app/views/foreman/unattended/finish-katello.erb
katello-3.0.0.rc7 app/views/foreman/unattended/finish-katello.erb
katello-3.0.0.rc5 app/views/foreman/unattended/finish-katello.erb
katello-3.0.0.rc4 app/views/foreman/unattended/finish-katello.erb
katello-3.0.0.rc3 app/views/foreman/unattended/finish-katello.erb