Puppet Class: archlinux_workstation::networkmanager
- Defined in:
- manifests/networkmanager.pp
Overview
Install and setup networkmanager,
ensure dhcpcd is stopped and nm is running. If
archlinux_workstation::kde
is defined, also install
kdeplasma-applets-networkmanagement
.
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 37 38 39 |
# File 'manifests/networkmanager.pp', line 6
class archlinux_workstation::networkmanager {
if ! defined(Class['archlinux_workstation']) {
fail('You must include the base archlinux_workstation class before using any subclasses')
}
package {'networkmanager':
ensure => present,
}
if defined(Class['archlinux_workstation::kde']) {
package {'plasma-nm':
ensure => present,
require => Package['networkmanager'],
}
}
service {'NetworkManager':
ensure => running,
enable => true,
require => Package['networkmanager'],
}
$ifs = split($::interfaces, ',')
$ifs.each |String $ifname| {
service {"dhcpcd@${ifname}":
ensure => stopped,
enable => false,
require => Service['NetworkManager'],
}
}
}
|