Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/290877

Change subject: nagios: move check_command/config to own file
......................................................................

nagios: move check_command/config to own file

Change-Id: If4a86c988f35792175cb1e76262ff76604b70021
---
M modules/nagios_common/manifests/check_command.pp
A modules/nagios_common/manifests/check_command/config.pp
2 files changed, 51 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/290877/1

diff --git a/modules/nagios_common/manifests/check_command.pp 
b/modules/nagios_common/manifests/check_command.pp
index f3f9013..cb8db2b 100644
--- a/modules/nagios_common/manifests/check_command.pp
+++ b/modules/nagios_common/manifests/check_command.pp
@@ -65,54 +65,3 @@
     }
 }
 
-# = Define: nagions_common::check_command::config
-# Sets up a check_command without an associated custom
-# check script. Useful when we want a command that just
-# builds on other existing commands
-#
-# [*ensure*]
-#   present or absent, to make the definition
-#   present or absent. Defaults to present
-#
-# [*config_dir*]
-#   The base directory to put configuration in.
-#   Defaults to '/etc/icinga/'
-#
-# [*source*]
-#   Path to source for the plugin configuration.
-#   Defaults to puppet:///modules/nagios_common/check_commands/$title.cfg
-#
-# [*content*]
-#   String content to use for the plugin configuration.
-#   Should not be used with the source parameter.
-#
-# [*owner*]
-#   The user which should own the config file.
-#   Defaults to 'icinga'
-#
-# [*group*]
-#   The group which should own the config file.
-#   Defaults to 'icinga'
-#
-define nagios_common::check_command::config(
-    $ensure = present,
-    $config_dir = '/etc/icinga',
-    $source = undef,
-    $content = undef,
-    $owner = 'icinga',
-    $group = 'icinga',
-) {
-    if ($source == undef) and ($content == undef) {
-        $real_source = 
"puppet:///modules/nagios_common/check_commands/${title}.cfg"
-    } else {
-        $real_source = $source
-    }
-
-    file { "${config_dir}/commands/${title}.cfg":
-        ensure  => $ensure,
-        source  => $real_source,
-        content => $content,
-        owner   => $owner,
-        group   => $group,
-    }
-}
diff --git a/modules/nagios_common/manifests/check_command/config.pp 
b/modules/nagios_common/manifests/check_command/config.pp
new file mode 100644
index 0000000..c57e3fe
--- /dev/null
+++ b/modules/nagios_common/manifests/check_command/config.pp
@@ -0,0 +1,51 @@
+# = Define: nagions_common::check_command::config
+# Sets up a check_command without an associated custom
+# check script. Useful when we want a command that just
+# builds on other existing commands
+#
+# [*ensure*]
+#   present or absent, to make the definition
+#   present or absent. Defaults to present
+#
+# [*config_dir*]
+#   The base directory to put configuration in.
+#   Defaults to '/etc/icinga/'
+#
+# [*source*]
+#   Path to source for the plugin configuration.
+#   Defaults to puppet:///modules/nagios_common/check_commands/$title.cfg
+#
+# [*content*]
+#   String content to use for the plugin configuration.
+#   Should not be used with the source parameter.
+#
+# [*owner*]
+#   The user which should own the config file.
+#   Defaults to 'icinga'
+#
+# [*group*]
+#   The group which should own the config file.
+#   Defaults to 'icinga'
+#
+define nagios_common::check_command::config(
+    $ensure = present,
+    $config_dir = '/etc/icinga',
+    $source = undef,
+    $content = undef,
+    $owner = 'icinga',
+    $group = 'icinga',
+) {
+    if ($source == undef) and ($content == undef) {
+        $real_source = 
"puppet:///modules/nagios_common/check_commands/${title}.cfg"
+    } else {
+        $real_source = $source
+    }
+
+    file { "${config_dir}/commands/${title}.cfg":
+        ensure  => $ensure,
+        source  => $real_source,
+        content => $content,
+        owner   => $owner,
+        group   => $group,
+    }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/290877
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4a86c988f35792175cb1e76262ff76604b70021
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to