Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380477 )

Change subject: Remove support for setting custom Salt grains
......................................................................

Remove support for setting custom Salt grains

Change-Id: I1aa5de81ad94c36747f53f52b7a82e7035700db8
---
D modules/salt/manifests/grain.pp
1 file changed, 0 insertions(+), 53 deletions(-)


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

diff --git a/modules/salt/manifests/grain.pp b/modules/salt/manifests/grain.pp
deleted file mode 100644
index 841f044..0000000
--- a/modules/salt/manifests/grain.pp
+++ /dev/null
@@ -1,53 +0,0 @@
-# == Define: salt::grain
-#
-# Set or remove a grain value.
-#
-# === Parameters
-#
-# [*grain*]
-#   The name of the grain. For example, 'deployment-target'.
-#   Defaults to the resource title.
-#
-# [*value*]
-#   Value to set or remove from grain.
-#
-# [*ensure*]
-#   If 'present', adds value to grain. If 'absent', removes it.
-#   Defaults to 'present'.
-#
-# [*replace*]
-#   If true, replaces the value in the grain. If false, it adds the value.
-#   Defaults to false.
-#
-# === Examples
-#
-#  salt::grain { 'cluster':
-#    value   => 'eqiad_text_cache',
-#    replace => true,
-#  }
-#
-define salt::grain(
-    $value,
-    $grain   = $title,
-    $ensure  = present,
-    $replace = false,
-) {
-    validate_ensure($ensure)
-    validate_bool($replace)
-
-    if $ensure == 'present' {
-        if $replace { $subcommand = 'set' } else { $subcommand = 'add' }
-        $onlyif     = undef
-        $unless     = "/usr/local/sbin/grain-ensure contains ${grain} ${value}"
-    } else {
-        $subcommand = 'remove'
-        $onlyif     = "/usr/local/sbin/grain-ensure contains ${grain} ${value}"
-        $unless     = undef
-    }
-
-    exec { "ensure_${grain}_${value}":
-        command => "/usr/local/sbin/grain-ensure ${subcommand} ${grain} 
${value}",
-        onlyif  => $onlyif,
-        unless  => $unless,
-    }
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1aa5de81ad94c36747f53f52b7a82e7035700db8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff <mmuhlenh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to