File tree Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Expand file tree Collapse file tree 4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -247,26 +247,21 @@ Static interface routes (host route):
247
247
248
248
Normal interface - VLAN - no IP:
249
249
250
- class { 'network::global':
251
- vlan => 'yes',
252
- }
253
-
254
250
network::if { 'eth0.330':
255
251
ensure => 'up',
256
- }
252
+ vlan => 'yes',
253
+ }
257
254
258
255
Normal interface - VLAN - static IPv4:
259
256
260
- class { 'network::global':
261
- vlan => 'yes',
262
- }
263
-
264
257
network::if::static { 'eth0.330':
265
258
ensure => 'up',
266
259
ipaddress => '10.2.3.248',
267
260
netmask => '255.255.255.0',
261
+ vlan => 'yes',
268
262
}
269
263
264
+
270
265
Promiscuous interface:
271
266
To set a static or dynamic interface to promiscuous mode (RedHat only), add:
272
267
promisc => true
Original file line number Diff line number Diff line change 29
29
# $defroute - optional
30
30
# $restart - optional - defaults to true
31
31
# $arpcheck - optional - defaults to true
32
+ # $vlan - optional - defaults to false
32
33
#
33
34
# === Actions:
34
35
#
82
83
$metric = undef ,
83
84
$restart = true ,
84
85
$arpcheck = true ,
86
+ $vlan = false ,
85
87
) {
86
88
# Validate our data
87
89
if $ipaddress {
118
120
validate_bool($manage_hwaddr )
119
121
validate_bool($flush )
120
122
validate_bool($arpcheck )
123
+ validate_bool($vlan )
121
124
122
125
network_if_base { $title:
123
126
ensure => $ensure ,
Original file line number Diff line number Diff line change 79
79
# $promisc - optional - defaults to false
80
80
# $restart - optional - defaults to true
81
81
# $arpcheck - optional - defaults to true
82
+ # $vlan - optional - defaults to false
82
83
#
83
84
# === Actions:
84
85
#
140
141
$promisc = false ,
141
142
$restart = true ,
142
143
$arpcheck = true ,
144
+ $vlan = false ,
143
145
) {
144
146
# Validate our booleans
145
147
validate_bool($noaliasrouting )
155
157
validate_bool($promisc )
156
158
validate_bool($restart )
157
159
validate_bool($arpcheck )
160
+ validate_bool($vlan )
158
161
# Validate our regular expressions
159
162
$states = [ ' ^up$' , ' ^down$' ]
160
163
validate_re($ensure , $states , ' $ensure must be either "up" or "down".' )
192
195
}
193
196
$iftemplate = template (' network/ifcfg-eth.erb' )
194
197
}
195
-
198
+ $vlanyes = $vlan ? {
199
+ true => ' yes' ,
200
+ default => undef ,
201
+ }
196
202
if $flush {
197
203
exec { 'network-flush' :
198
204
user => ' root' ,
Original file line number Diff line number Diff line change @@ -70,4 +70,6 @@ check_link_down() {
70
70
<% end -%>
71
71
<% if !@arpcheck %> ARPCHECK=no
72
72
<% end -%>
73
+ <% if @vlanyes %> VLAN=<%= @vlanyes %>
74
+ <% end -%>
73
75
NM_CONTROLLED=no
You can’t perform that action at this time.
0 commit comments