From 5257611b8469d8a41b075a027546dbacb0d36fa9 Mon Sep 17 00:00:00 2001 From: Martin Schuette Date: Sun, 4 May 2014 23:18:42 +0200 Subject: [PATCH] parameterize zabbix and munin servers --- README.md | 7 +++++++ manifests/sysadmin.pp | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a9cdfee..69eddec 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,13 @@ page), and credentials for fastd and openvpn. Example puppet code (save e.g. as `/etc/puppet/gw.pp`): ``` + +class { 'ff_gw::sysadmin': + # both optional, used for FFHH monitoring: + zabbixserver => 'argos.mschuette.name', + muninserver => '78.47.49.236', +} + class { 'ff_gw': # user accounts: accounts => { diff --git a/manifests/sysadmin.pp b/manifests/sysadmin.pp index 807e7fe..fc06b7f 100644 --- a/manifests/sysadmin.pp +++ b/manifests/sysadmin.pp @@ -1,5 +1,5 @@ # kitchen sink class for various small settings -class ff_gw::sysadmin { +class ff_gw::sysadmin($zabbixserver = '127.0.0.1', $muninserver = '127.0.0.1') { # use Hiera as a Puppet data source file { @@ -62,8 +62,8 @@ class ff_gw::sysadmin { file { '/etc/zabbix/zabbix_agentd.d/argos_monitoring.conf': ensure => file, content => "# managed by puppet -Server=argos.mschuette.name -ServerActive=argos.mschuette.name +Server=${zabbixserver} +ServerActive=${zabbixserver} HostnameItem=${::hostname} "; } @@ -106,7 +106,7 @@ ignore_file \.pod$ port 4949 host_name <%= @fqdn %> -cidr_allow 78.47.49.236/32 +cidr_allow <%= @muninserver %>/32 host <%= @ipaddress_eth0 %> '); '/usr/share/munin/plugins/vnstat_':