Ryan Lane has uploaded a new change for review.

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


Change subject: Make id explicit, but also allow it to be unset
......................................................................

Make id explicit, but also allow it to be unset

Change-Id: I2d3b41734998f9146c83cc49d738f8e23cad1883
---
M manifests/role/salt.pp
M modules/salt/templates/minion.erb
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/64648/1

diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp
index cf7eb0e..3a7f5ca 100644
--- a/manifests/role/salt.pp
+++ b/manifests/role/salt.pp
@@ -79,7 +79,7 @@
                $salt_master_finger = 
"5d:07:fb:28:21:60:fb:db:46:ff:e8:1c:91:a2:1a:f9"
        } else {
                $salt_master = "sockpuppet.pmtpa.wmnet"
-               $salt_client_id = undef
+               $salt_client_id = ${fqdn}
                $salt_grains = {
                        "realm" => $realm,
                        "site" => $site,
diff --git a/modules/salt/templates/minion.erb 
b/modules/salt/templates/minion.erb
index cce91a5..e1b8575 100644
--- a/modules/salt/templates/minion.erb
+++ b/modules/salt/templates/minion.erb
@@ -36,7 +36,7 @@
 # Since salt uses detached ids it is possible to run multiple minions on the
 # same machine but with different ids, this can be useful for salt compute
 # clusters.
-id: <%= salt_client_id %>
+<% if @salt_master %>id: <%= salt_client_id %><% end %>
 
 # Append a domain to a hostname in the event that it does not exist.  This is
 # useful for systems where socket.getfqdn() does not actually result in a

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

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

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

Reply via email to