Dzahn has uploaded a new change for review.

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


Change subject: add salt grains automatically in system::role
......................................................................

add salt grains automatically in system::role

.. so $rolename is obvious, but what to use as value?

in https://gerrit.wikimedia.org/r/#/c/83768/
i have examples like:

salt::grain { 'applicationserver': value => 'api' }
salt::grain { 'applicationserver': value => 'bits' }

etc. and do that in a specific role class, like role/applicationserver

but this one is to reply to Faidon's suggestion to do
this once in the system::role globally

Change-Id: Ie8a53c7f478401b53444e8f187243f9c41603054
---
M modules/system/manifests/role.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/107831/1

diff --git a/modules/system/manifests/role.pp b/modules/system/manifests/role.pp
index edd95ca..95a10b5 100644
--- a/modules/system/manifests/role.pp
+++ b/modules/system/manifests/role.pp
@@ -7,6 +7,7 @@
 
     $rolename = regsubst($title, ':', '-', 'G')
     $motd_filename = "/etc/update-motd.d/05-role-${rolename}"
+    salt::grain { $rolename: value => $rolename }
 
     if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '9.10') >= 0 
{
         file { $motd_filename:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8a53c7f478401b53444e8f187243f9c41603054
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>

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

Reply via email to