Merge remote-tracking branch 'origin/master' into staging
[mirror/dsa-puppet.git] / modules / stretch / manifests / network_online.pp
diff --git a/modules/stretch/manifests/network_online.pp b/modules/stretch/manifests/network_online.pp
new file mode 100644 (file)
index 0000000..432973b
--- /dev/null
@@ -0,0 +1,19 @@
+class stretch::network_online {
+       if versioncmp($::lsbmajdistrelease, '9') <= 0 {
+               
+               exec { 'systemctl enable ifupdown-wait-online.service':
+                       refreshonly => true,
+               }
+
+               file { '/lib/ifupdown/wait-online.sh':
+                       mode   => '0555',
+                       source => 'puppet:///modules/stretch/wait-online.sh',
+               }
+               file { '/lib/systemd/system/ifupdown-wait-online.service':
+                       mode   => '0555',
+                       source => 'puppet:///modules/stretch/ifupdown-wait-online.service',
+                       notify  => Exec['systemctl enable ifupdown-wait-online.service'],
+               }
+       }
+}
+