From 51622c10f922671cb8bcb1cda874f64ea932a462 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Jan 2013 15:40:46 -0200 Subject: Monkeysphere host really needs to be a resource and not a class --- manifests/host.pp | 4 ++-- manifests/plug.pp | 2 +- manifests/subsystems/monkeysphere.pp | 2 +- manifests/vserver.pp | 8 ++++---- manifests/vserver/instance.pp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'manifests') diff --git a/manifests/host.pp b/manifests/host.pp index ee6c18e..42e739d 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -6,10 +6,10 @@ class nodo::host inherits nodo { include sysctl include utils::physical include resolver - - class { 'monkeysphere_host': } class { 'syslog-ng': } + monkeysphere_host { "${::hostname}": } + # Firewall configuration class { 'firewall': } diff --git a/manifests/plug.pp b/manifests/plug.pp index 630be3a..f5992fc 100644 --- a/manifests/plug.pp +++ b/manifests/plug.pp @@ -5,7 +5,7 @@ class nodo::plug inherits nodo { include sysctl include resolver - class { 'monkeysphere_host': } + monkeysphere_host { "${::hostname}": } class { 'firewall': } diff --git a/manifests/subsystems/monkeysphere.pp b/manifests/subsystems/monkeysphere.pp index 54bf078..76530ca 100644 --- a/manifests/subsystems/monkeysphere.pp +++ b/manifests/subsystems/monkeysphere.pp @@ -1,4 +1,4 @@ -class monkeysphere_host( +define monkeysphere_host( $port = hiera('nodo::monkeysphere_host::ssh_port', ''), $mail_recipient = hiera('nodo::root_mail_recipient', 'nobody') ) { diff --git a/manifests/vserver.pp b/manifests/vserver.pp index 9feb030..b68d501 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -20,8 +20,8 @@ class nodo::vserver inherits nodo { "direct": { # Apply munin and monkeysphere configuration for # for directly hosted nodes. - Munin_node <<| title == $hostname |>> - Monkeysphere_host <<| title == $hostname |>> + Munin_node <<| title == $::hostname |>> + Monkeysphere_host <<| title == $::hostname |>> # Set proxy configuration $nodo_https_proxy = 'yes' @@ -29,8 +29,8 @@ class nodo::vserver inherits nodo { "third-party": { # Apply munin and monkeysphere configuration for # nodes hosted by third-parties. - munin_node { "$hostname": } - monkeysphere_host { "$hostname": + munin_node { "${::hostname}": } + monkeysphere_host { "${::hostname}": port => $node_ssh_port, } diff --git a/manifests/vserver/instance.pp b/manifests/vserver/instance.pp index 90b0b0a..dba9abb 100644 --- a/manifests/vserver/instance.pp +++ b/manifests/vserver/instance.pp @@ -52,7 +52,7 @@ define nodo::vserver::instance($context, $ensure = 'running', $proxy = false, } # Create a munin virtual resource to be realized in the node - @@munin_node { "$name": + @@munin_node { "${name}": port => $munin_port ? { false => "49$id", default => $munin_port, -- cgit v1.2.3