Ryan Lane has submitted this change and it was merged.

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(-)

Approvals:
  Ryan Lane: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/salt.pp b/manifests/role/salt.pp
index cf7eb0e..fd72671 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: merged
Gerrit-Change-Id: I2d3b41734998f9146c83cc49d738f8e23cad1883
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ryan Lane <[email protected]>
Gerrit-Reviewer: Ryan Lane <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to