Permalink
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (14 sloc) 415 Bytes
class ifupdown {
$intvars = hiera('interfaces')[$hostname]
$networks = hiera('networks')
file { '/etc/network/interfaces':
owner => root,
group => root,
mode => '0644',
content => template('ifupdown/interfaces.erb'),
}
exec { '/sbin/ifdown -a && /sbin/ifup -a':
subscribe => File['/etc/network/interfaces'],
refreshonly => true
}
}