public
Fork of jtimberman/puppet
Description: Public Puppet Configuration by The SANS Institute
Homepage:
Clone URL: git://github.com/sansnoc/puppet.git
Joshua Timberman (author)
Wed Jun 18 08:46:57 -0700 2008
puppet / network / templates / ifcfg.erb
100644 36 lines (35 sloc) 0.977 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
################################################
# #
# THIS FILE IS MANAGED BY PUPPET. DO NOT EDIT! #
# #
################################################
<% if interface_type == 'alias' -%>
DEVICE=<%= interface %>:<%= ifnum %>
<% if ifstate == 'present' -%>
ONPARENT=yes
<% elsif ifstate == 'absent' -%>
ONPARENT=no
<% end -%>
<% else -%>
DEVICE=<%= interface %>
<% if ifstate == 'present' -%>
ONBOOT=yes
<% elsif ifstate == 'absent' -%>
ONBOOT=no
<% end -%>
<% end -%>
<% if interface_type != 'tap' && interface_type != 'slave' -%>
<% if name.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) -%>
IPADDR=<%= name %>
NETMASK=<%= netmask %>
<% end -%>
<% end -%>
<% if bondopts != '' && (interface_type == 'bond' || interface_type == 'tap') -%>
BONDING_OPTS="<%= bondopts %>"
<% end -%>
<% if interface_type == 'slave' -%>
MASTER=<%= master %>
SLAVE=yes
<% end -%>
BOOTPROTO=none
USERCTL=no