Project

General

Profile

Download (1.22 KB) Statistics
| Branch: | Tag: | Revision:
<%#
kind: provision
name: XenServer default answerfile
oses:
- XenServer
%>
<% subnet = @host.subnet -%>
<% dhcp = subnet.dhcp_boot_mode? -%>
<% interface_name = @host.primary_interface.identifier.blank? ? 'eth0' : @host.primary_interface.identifier -%>
<?xml version="1.0"?>
<installation mode="fresh" srtype="lvm">
<%= @host.diskLayout -%>
<keymap><%= @host.params['keyboard'] || 'us' %></keymap>
<hostname><%= @host.shortname %></hostname>
<root-password type="hash"><%= root_pass %></root-password>
<source type="url"><%= @mediapath %></source>
<admin-interface name="<%= interface_name %>" proto="<%= dhcp ? 'dhcp' : 'static' %>">
<% unless dhcp -%>
<ip><%= @host.ip %></ip>
<subnet-mask><%= @host.subnet.mask %></subnet-mask>
<gateway><%= @host.subnet.gateway %></gateway>
<% end -%>
</admin-interface>
<name-server><%= subnet.dns_primary %></name-server>
<name-server><%= subnet.dns_secondary %></name-server>
<ntp-server><%= @host.params['ntp-server'] || 'pool.ntp.org' %></ntp-server>
<timezone><%= @host.params['time-zone'] || 'UTC' %></timezone>
<time-config-method>ntp</time-config-method>
<script stage="installation-complete" type="url">
<%= foreman_url('finish') %>
</script>
</installation>
(4-4/4)