aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base/host.pp2
-rw-r--r--manifests/base/plug.pp2
-rw-r--r--manifests/base/vserver.pp6
-rw-r--r--manifests/init.pp14
-rw-r--r--manifests/role/nas.pp2
-rw-r--r--manifests/subsystem/monitor/munin.pp (renamed from manifests/defines/munin_node.pp)2
-rw-r--r--manifests/subsystem/monkeysphere.pp (renamed from manifests/defines/monkeysphere_host.pp)2
-rw-r--r--manifests/subsystem/ssh/config.pp (renamed from manifests/defines/ssh_config.pp)4
-rw-r--r--manifests/subsystem/ssh/create_key.pp (renamed from manifests/defines/ssh_create_key.pp)4
-rw-r--r--manifests/subsystem/ssh/folder.pp (renamed from manifests/defines/ssh_folder.pp)2
-rw-r--r--manifests/subsystem/ssh/known_hosts.pp (renamed from manifests/defines/ssh_known_hosts.pp)4
-rw-r--r--manifests/subsystem/ssh/local_key.pp (renamed from manifests/defines/ssh_local_key.pp)4
-rw-r--r--manifests/subsystem/sysctl/entry.pp (renamed from manifests/defines/sysctl.pp)2
-rw-r--r--manifests/vserver/instance.pp4
14 files changed, 22 insertions, 32 deletions
diff --git a/manifests/base/host.pp b/manifests/base/host.pp
index 799fe20..433364b 100644
--- a/manifests/base/host.pp
+++ b/manifests/base/host.pp
@@ -49,7 +49,7 @@ class nodo::base::host {
# Munin configuration
$munin = hiera('nodo::host::use_munin', True)
if $munin == true {
- munin_node { "$hostname":
+ nodo::subsystem::monitor::munin { "$hostname":
port => '4900',
}
}
diff --git a/manifests/base/plug.pp b/manifests/base/plug.pp
index eedd9fe..b71b648 100644
--- a/manifests/base/plug.pp
+++ b/manifests/base/plug.pp
@@ -20,7 +20,7 @@ class nodo::base::plug {
}
# Munin configuration
- munin_node { "${::hostname}":
+ nodo::subsystem::monitor::munin { "${::hostname}":
port => '4900',
}
}
diff --git a/manifests/base/vserver.pp b/manifests/base/vserver.pp
index 0a8b589..f904f32 100644
--- a/manifests/base/vserver.pp
+++ b/manifests/base/vserver.pp
@@ -16,13 +16,13 @@ class nodo::base::vserver {
"direct": {
# Apply munin and monkeysphere configuration for
# for directly hosted nodes.
- Munin_node <<| title == $::hostname |>>
- Monkeysphere_host <<| title == $::hostname |>>
+ Nodo::Subsystem::Monitor::Munin <<| title == $::hostname |>>
+ Nodo::Subsystem::Monkeysphere <<| title == $::hostname |>>
}
"third-party": {
# Apply munin and monkeysphere configuration for
# nodes hosted by third-parties.
- munin_node { "${::hostname}": }
+ nodo::subsystem::monitor::munin { "${::hostname}": }
monkeysphere_host { "${::hostname}":
port => hiera('nodo::vserver::ssh_port', '22'),
}
diff --git a/manifests/init.pp b/manifests/init.pp
index d97d3f3..1751d9c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,18 +6,8 @@
import "common"
# Modules that still doesn't support autoloading
-#import 'dhcp'
-#import 'virtual'
-
-# Definitions
-import "defines/monkeysphere_host.pp"
-import "defines/munin_node.pp"
-import "defines/ssh_config.pp"
-import "defines/ssh_create_key.pp"
-import "defines/ssh_known_hosts.pp"
-import "defines/ssh_local_key.pp"
-import "defines/ssh_folder.pp"
-import "defines/sysctl.pp"
+import 'dhcp'
+import 'virtual'
class nodo(
$role = hiera('nodo::role', 'default'),
diff --git a/manifests/role/nas.pp b/manifests/role/nas.pp
index 6b80e5f..536f9ca 100644
--- a/manifests/role/nas.pp
+++ b/manifests/role/nas.pp
@@ -45,7 +45,7 @@ class nodo::role::nas(
if $dlna == true {
# See https://wiki.archlinux.org/index.php/MiniDLNA#Automatic_Media_DB_Update
- sysctl { 'fs.inotify.max_user_watches':
+ nodo::subsystem::sysctl::entry { 'fs.inotify.max_user_watches':
value => 100000,
}
diff --git a/manifests/defines/munin_node.pp b/manifests/subsystem/monitor/munin.pp
index f867fd3..aa70c2f 100644
--- a/manifests/defines/munin_node.pp
+++ b/manifests/subsystem/monitor/munin.pp
@@ -1,5 +1,5 @@
# Define a munin node
-define munin_node(
+define nodo::sybsystem::monitor::munin(
$port = hiera('nodo::munin_node::port', '4949'),
$allow = hiera('nodo::munin_node::allow', ''),
$host = hiera('nodo::munin_node::host', $::fqdn),
diff --git a/manifests/defines/monkeysphere_host.pp b/manifests/subsystem/monkeysphere.pp
index b4b21e0..c09effe 100644
--- a/manifests/defines/monkeysphere_host.pp
+++ b/manifests/subsystem/monkeysphere.pp
@@ -1,4 +1,4 @@
-define monkeysphere_host(
+define nodo::subsystem::monkeysphere(
$port = hiera('nodo::monkeysphere_host::ssh_port', ''),
$mail_recipient = hiera('mail::root_mail_recipient', 'nobody')
) {
diff --git a/manifests/defines/ssh_config.pp b/manifests/subsystem/ssh/config.pp
index 5585520..6c9fbc3 100644
--- a/manifests/defines/ssh_config.pp
+++ b/manifests/subsystem/ssh/config.pp
@@ -1,11 +1,11 @@
# Manage ssh config for a particular user
-define ssh_config(
+define nodo::subsystem::ssh::config(
$owner,
$group,
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- ssh_folder { "ssh-config-${name}":
+ nodo::subsystem::ssh::folder { "ssh-config-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_create_key.pp b/manifests/subsystem/ssh/create_key.pp
index 77d1f00..881ddda 100644
--- a/manifests/defines/ssh_create_key.pp
+++ b/manifests/subsystem/ssh/create_key.pp
@@ -1,10 +1,10 @@
-define ssh_create_key(
+define nodo::subsystem::ssh::create_key(
$owner,
$group,
$keyfile = 'id_rsa',
$home = '/home/$owner'
) {
- ssh_folder { "ssh_create_key-${name}":
+ nodo::subsystem::ssh::folder { "ssh_create_key-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_folder.pp b/manifests/subsystem/ssh/folder.pp
index 41b688a..462f8fb 100644
--- a/manifests/defines/ssh_folder.pp
+++ b/manifests/subsystem/ssh/folder.pp
@@ -1,5 +1,5 @@
# Manage a ssh folder
-define ssh_folder(
+define nodo:subsystem::ssh::folder(
$home,
$owner,
$group,
diff --git a/manifests/defines/ssh_known_hosts.pp b/manifests/subsystem/ssh/known_hosts.pp
index c0d7157..c20b973 100644
--- a/manifests/defines/ssh_known_hosts.pp
+++ b/manifests/subsystem/ssh/known_hosts.pp
@@ -1,10 +1,10 @@
# Manage known_hosts for a particular user
-define ssh_known_host(
+define nodo::subsystem::ssh::known_host(
$owner,
$home = '/home/$owner',
$ssh_localhost_auth = false
) {
- ssh_folder { "ssh_known_host-${name}":
+ nodo::subsystem::ssh::folder { "ssh_known_host-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/ssh_local_key.pp b/manifests/subsystem/ssh/local_key.pp
index 57bb251..f311ea3 100644
--- a/manifests/defines/ssh_local_key.pp
+++ b/manifests/subsystem/ssh/local_key.pp
@@ -1,5 +1,5 @@
# Manage local ssh keys
-define ssh_local_key(
+define nodo::subsystem::ssh::local_key(
$owner = $name,
$group = $name,
$home = "/home/${owner}",
@@ -7,7 +7,7 @@ define ssh_local_key(
$dest = 'id_rsa',
$ensure = 'present',
) {
- ssh_folder { "ssh_local_key-${name}":
+ nodo::subsystem::ssh::folder { "ssh_local_key-${name}":
home => $home,
owner => $owner,
group => $group,
diff --git a/manifests/defines/sysctl.pp b/manifests/subsystem/sysctl/entry.pp
index 06f6a14..ddd6020 100644
--- a/manifests/defines/sysctl.pp
+++ b/manifests/subsystem/sysctl/entry.pp
@@ -1,5 +1,5 @@
# Simple sysctl definition
-define sysctl(
+define nodo::subsystem::sysctl::entry(
$ensure = present,
$value
) {
diff --git a/manifests/vserver/instance.pp b/manifests/vserver/instance.pp
index 2003861..23cebb1 100644
--- a/manifests/vserver/instance.pp
+++ b/manifests/vserver/instance.pp
@@ -71,7 +71,7 @@ define nodo::vserver::instance(
}
# Create a munin virtual resource to be realized in the node
- @@munin_node { "${name}":
+ @@nodo::subsystem::monitor::munin { "${name}":
port => $munin_port ? {
false => "49$id",
default => $munin_port,
@@ -79,7 +79,7 @@ define nodo::vserver::instance(
}
# Create a monkeysphere virtual resource to be realized in the node
- @@monkeysphere_host { "$name":
+ @@nodo::subsystem::monkeysphere { "$name":
port => $monkeysphere_ssh_port ? {
false => "22$id",
default => $monkeysphere_ssh_port,