summaryrefslogtreecommitdiff
path: root/modules/networking
diff options
context:
space:
mode:
Diffstat (limited to 'modules/networking')
-rw-r--r--modules/networking/manifests/init.pp16
-rw-r--r--modules/networking/manifests/networkd.pp23
-rw-r--r--modules/networking/manifests/networkd_instance.pp21
-rw-r--r--modules/networking/templates/interface.epp16
-rw-r--r--modules/networking/templates/unit_file.epp11
5 files changed, 0 insertions, 87 deletions
diff --git a/modules/networking/manifests/init.pp b/modules/networking/manifests/init.pp
deleted file mode 100644
index 7dc2450..0000000
--- a/modules/networking/manifests/init.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-class networking (
- Optional[Enum['systemd']] $provider = undef,
- Hash[String,Hash] $items = {},
-) {
-
- # TODO choose a sensible provider here
-
- case $provider {
- 'systemd', undef: {
- include ::networking::networkd
- create_resources(networking::networkd_instance, $items)
- }
- default: {
- }
- }
-}
diff --git a/modules/networking/manifests/networkd.pp b/modules/networking/manifests/networkd.pp
deleted file mode 100644
index dec2e33..0000000
--- a/modules/networking/manifests/networkd.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-class networking::networkd (
- Boolean $notify_ = true,
- Boolean $manage_directory = true,
- String $root = '/',
- String $path = "${root}/etc/systemd/network",
-) {
- if $manage_directory {
- file { $path:
- ensure => directory,
- purge => true,
- recurse => true,
- }
- }
-
- if $notify_ {
- exec { 'reload networkd':
- command => 'systemctl reload-or-restart systemd-networkd',
- path => ['/bin', '/usr/bin',],
- refreshonly => true,
- }
- }
-}
-
diff --git a/modules/networking/manifests/networkd_instance.pp b/modules/networking/manifests/networkd_instance.pp
deleted file mode 100644
index 4089e75..0000000
--- a/modules/networking/manifests/networkd_instance.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-define networking::networkd_instance (
- Hash[String,Hash] $content,
- Enum['present','absent'] $ensure = 'present',
- String $path = $networking::networkd::path,
- String $filename = $name,
- Integer $priority = 20,
- Enum['network', 'netdev', 'link'] $type = 'network',
- String $real_filename = "${priority}-${filename}.${type}",
- String $file = "${path}/${real_filename}",
-) {
-
- include ::networking::networkd
-
- file { $file:
- ensure => $ensure,
- content => epp('networking/unit_file.epp', {
- data => $content
- }),
- notify => if $networking::networkd::notify_ { Exec['reload networkd'] } else { [] },
- }
-}
diff --git a/modules/networking/templates/interface.epp b/modules/networking/templates/interface.epp
deleted file mode 100644
index d824f69..0000000
--- a/modules/networking/templates/interface.epp
+++ /dev/null
@@ -1,16 +0,0 @@
-# File managed by puppet
-auto host0
-# allow-hotplug host0
-
-iface host0 inet <%= if $addr4 { 'static' } else { 'dhcp' } %>
-<%- if $addr4 { -%>
- address <%= $addr4 %>
- <%- if $gw4 { -%>
- gateway <%= $gw4 %>
- <%- } -%>
-<%- } -%>
-
-
-iface host0 inet6 auto
- private 0
-
diff --git a/modules/networking/templates/unit_file.epp b/modules/networking/templates/unit_file.epp
deleted file mode 100644
index 00d486a..0000000
--- a/modules/networking/templates/unit_file.epp
+++ /dev/null
@@ -1,11 +0,0 @@
-<%- | Hash[String,Hash] $data
-| -%>
-<%- $data.each |$key, $sub| { -%>
-[<%= $key %>]
-<%- $sub.each |$k, $v| { -%>
-<%- if $v =~ Array { $v.each |$v| { -%>
-<%= $k %>=<%= $v %>
-<%- } } else { -%>
-<%= $k %>=<%= $v %>
-<%- } -%>
-<%- }} -%>