Project

General

Profile

« Previous | Next » 

Revision 013ee65a

Added by Dominic Cleal about 10 years ago

templates - sync from community-templates

View differences:

app/views/unattended/kickstart/provision.erb
services --disabled autofs,gpm,sendmail,cups,iptables,ip6tables,auditd,arptables_jf,xfs,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd,restorecond,mcstrans,rhnsd,yum-updatesd
<% end -%>
<% if realm_compatible && @host.respond_to?(:otp) && @host.otp && @host.realm -%>
<% if realm_compatible && @host.info["parameters"]["realm"] && @host.otp && @host.realm -%>
realm join --one-time-password='<%= @host.otp %>' <%= @host.realm %>
<% end -%>
......
/usr/sbin/ntpdate -sub <%= @host.params['ntp-server'] || '0.fedora.pool.ntp.org' %>
/usr/sbin/hwclock --systohc
<% if realm_incompatible && @host.respond_to?(:otp) && @host.otp && @host.realm && @host.realm.realm_type == "FreeIPA" -%>
<% if realm_incompatible && @host.info["parameters"]["realm"] && @host.otp && @host.realm && @host.realm.realm_type == "FreeIPA" -%>
<%= snippet "freeipa_register" %>
<% end -%>
......
exit 0
%end
app/views/unattended/kickstart/provision_rhel.erb
authconfig --useshadow --passalgo=sha256 --kickstart
timezone --utc <%= @host.params['time-zone'] || 'UTC' %>
<% if os_major >= 7 && @host.respond_to?(:otp) && @host.otp && @host.realm -%>
<% if os_major >= 7 && @host.info["parameters"]["realm"] && @host.otp && @host.realm -%>
realm join --one-time-password=<%= @host.otp %> <%= @host.realm %>
<% end -%>
......
<%= snippet 'redhat_register' %>
<% if @host.respond_to?(:otp) && @host.otp && @host.realm && @host.realm.realm_type == "FreeIPA" && os_major <= 6 -%>
<% if @host.info["parameters"]["realm"] && @host.otp && @host.realm && @host.realm.realm_type == "FreeIPA" && os_major <= 6 -%>
<%= snippet "freeipa_register" %>
<% end -%>
app/views/unattended/snippets/_redhat_register.erb
# rhel-6-server-optional-rpms) to
# enable after registration)
#
# subscription_manager_pool = <pool> (specific pool to be used for
# registration)
#
# Set this parameter regardless of which registration method you're using:
#
# activation_key = <key> (activation key string, not needed if using
......
<% (enabled_repos = "yum-config-manager --enable #{@host.params['subscription_manager_repos'].gsub(',', ' ')}") if @host.params['subscription_manager_repos'] %>
<% if @host.params['subscription_manager_username'] && @host.params['subscription_manager_password'] %>
subscription-manager register --username="<%= @host.params['subscription_manager_username'] %>" --password="<%= @host.params['subscription_manager_password'] %>" --auto-attach
<% if @host.params['subscription_manager_pool'] %>
subscription-manager attach --pool="<%= @host.params['subscription_manager_pool'] %>"
<% end %>
# workaround for RHEL 6.4 bug https://bugzilla.redhat.com/show_bug.cgi?id=1008016
subscription-manager repos --list > /dev/null
<%= enabled_repos if enabled_repos %>

Also available in: Unified diff