foreman/app/views/unattended/autoyast/provision.erb @ 0fa5d146
68f7a705 | Ohad Levy | <?xml version="1.0" encoding="UTF-8"?>
|
|
0fa5d146 | Dominic Cleal | <%#
|
|
kind: provision
|
|||
name: Community AutoYaST
|
|||
%>
|
|||
68f7a705 | Ohad Levy | <!DOCTYPE profile>
|
|
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
|
|||
<general>
|
|||
<mode>
|
|||
<confirm config:type="boolean">false</confirm>
|
|||
<final_reboot config:type="boolean">true</final_reboot>
|
|||
</mode>
|
|||
</general>
|
|||
<networking>
|
|||
<dns>
|
|||
<hostname><%= @host.name %></hostname>
|
|||
<resolv_conf_policy>auto</resolv_conf_policy>
|
|||
0fa5d146 | Dominic Cleal | <% if @host.domain -%>
|
|
<searchlist config:type="list">
|
|||
<search><%= @host.domain %></search>
|
|||
</searchlist>
|
|||
<% end -%>
|
|||
68f7a705 | Ohad Levy | </dns>
|
|
<interfaces config:type="list">
|
|||
<interface>
|
|||
<bootproto>dhcp</bootproto>
|
|||
<device>eth0</device>
|
|||
<startmode>auto</startmode>
|
|||
<usercontrol>no</usercontrol>
|
|||
</interface>
|
|||
</interfaces>
|
|||
</networking>
|
|||
<ntp-client>
|
|||
<configure_dhcp config:type="boolean">false</configure_dhcp>
|
|||
<peers config:type="list">
|
|||
<peer>
|
|||
0fa5d146 | Dominic Cleal | <address><%= @host.params["ntp-server"] || "0.opensuse.pool.ntp.org" %></address>
|
|
68f7a705 | Ohad Levy | <initial_sync config:type="boolean">true</initial_sync>
|
|
<options></options>
|
|||
<type>server</type>
|
|||
</peer>
|
|||
</peers>
|
|||
<start_at_boot config:type="boolean">true</start_at_boot>
|
|||
<start_in_chroot config:type="boolean">true</start_in_chroot>
|
|||
</ntp-client>
|
|||
<%= @host.diskLayout %>
|
|||
<runlevel>
|
|||
<default>3</default>
|
|||
</runlevel>
|
|||
<software>
|
|||
<base>default</base>
|
|||
<packages config:type="list">
|
|||
<package>puppet</package>
|
|||
<package>wget</package>
|
|||
</packages>
|
|||
</software>
|
|||
<users config:type="list">
|
|||
<user>
|
|||
<username>root</username>
|
|||
<encrypted config:type="boolean">true</encrypted>
|
|||
<fullname>root</fullname>
|
|||
<gid>0</gid>
|
|||
<home>/root</home>
|
|||
<shell>/bin/bash</shell>
|
|||
<uid>0</uid>
|
|||
72e1d32d | Ohad Levy | <user_password><%= root_pass %></user_password>
|
|
68f7a705 | Ohad Levy | </user>
|
|
</users>
|
|||
<scripts>
|
|||
<post-scripts config:type="list">
|
|||
<script>
|
|||
<filename>post.sh</filename>
|
|||
<interpreter>shell</interpreter>
|
|||
<network_needed config:type="boolean">true</network_needed>
|
|||
<notification>Setting up Puppet / Foreman ...</notification>
|
|||
<debug config:type="boolean">true</debug>
|
|||
<source><![CDATA[
|
|||
cat > /etc/puppet/puppet.conf << EOF
|
|||
0fa5d146 | Dominic Cleal | <%= snippet "puppet.conf" -%>
|
|
68f7a705 | Ohad Levy | EOF
|
|
0fa5d146 | Dominic Cleal | if [ -f "/etc/sysconfig/puppet" ]
|
|
then
|
|||
/usr/bin/sed -ie s/^PUPPET_SERVER=.*/PUPPET_SERVER=<%= @host.puppetmaster %>/ /etc/sysconfig/puppet
|
|||
fi
|
|||
/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag --server <%= @host.puppetmaster %> --no-daemonize
|
|||
68f7a705 | Ohad Levy | /usr/bin/wget -q -O /dev/null --no-check-certificate <%= foreman_url %>
|
|
/sbin/chkconfig puppet on -f
|
|||
]]>
|
|||
</source>
|
|||
</script>
|
|||
</post-scripts>
|
|||
</scripts>
|
|||
0fa5d146 | Dominic Cleal | <keyboard>
|
|
<keymap>english-us</keymap>
|
|||
</keyboard>
|
|||
<timezone>
|
|||
<hwclock>UTC</hwclock>
|
|||
<timezone>Etc/UTC</timezone>
|
|||
</timezone>
|
|||
68f7a705 | Ohad Levy | </profile>
|