diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-03 19:55:36 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-03 20:18:41 +0100 |
commit | 513abeec351a66f97be47805cfee8f3f2fa45181 (patch) | |
tree | 73c8ab36e86116b49749b83a9e85a48c6e1f8508 /modules/wpa_supplicant/manifests/interface.pp | |
parent | Rework syslinux. (diff) | |
download | webdav_server-513abeec351a66f97be47805cfee8f3f2fa45181.tar.gz webdav_server-513abeec351a66f97be47805cfee8f3f2fa45181.tar.xz |
Add wpa_supplicant.
Diffstat (limited to 'modules/wpa_supplicant/manifests/interface.pp')
-rw-r--r-- | modules/wpa_supplicant/manifests/interface.pp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/wpa_supplicant/manifests/interface.pp b/modules/wpa_supplicant/manifests/interface.pp new file mode 100644 index 0000000..8254359 --- /dev/null +++ b/modules/wpa_supplicant/manifests/interface.pp @@ -0,0 +1,19 @@ +define wpa_supplicant::interface ( + String $interface = $name, + Array[Hash] $networks = [], +) { + service { "wpa_supplicant@${interface}.service": + ensure => running, + enable => true, + } + + file { "/etc/wpa_supplicant/wpa_supplicant-${interface}.conf": + ensure => file, + content => epp('wpa_supplicant/wpa_supplicant.conf.epp', { + networks => $networks + }), + } ~> exec { "Reload wpa_supplicant for ${interface}": + command => [ 'wpa_cli', 'reconfigure', '-i', $interface, ], + path => [ '/bin', '/usr/bin', ], + } +} |