Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: snapshot: unify node declarations, use role, hiera
......................................................................


snapshot: unify node declarations, use role, hiera

See T86774

Change-Id: If95c91749d6290ba9dc2e44251a6344f1641c687
Signed-off-by: Giuseppe Lavagetto <[email protected]>
---
A hieradata/hosts/snapshot1001.yaml
A hieradata/role/common/snapshot/common.yaml
M manifests/role/snapshot.pp
M manifests/site.pp
4 files changed, 9 insertions(+), 34 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/hosts/snapshot1001.yaml 
b/hieradata/hosts/snapshot1001.yaml
new file mode 100644
index 0000000..a5932da
--- /dev/null
+++ b/hieradata/hosts/snapshot1001.yaml
@@ -0,0 +1 @@
+snapshot::dumps::hugewikis: true
diff --git a/hieradata/role/common/snapshot/common.yaml 
b/hieradata/role/common/snapshot/common.yaml
new file mode 100644
index 0000000..8ddbb27
--- /dev/null
+++ b/hieradata/role/common/snapshot/common.yaml
@@ -0,0 +1,3 @@
+admin::groups:
+  - udp2log-users
+  - deployment
diff --git a/manifests/role/snapshot.pp b/manifests/role/snapshot.pp
index a4953f3..eaddf5a 100644
--- a/manifests/role/snapshot.pp
+++ b/manifests/role/snapshot.pp
@@ -1,4 +1,5 @@
 class role::snapshot::common {
+    include admin
     include role::dataset::systemusers
     # The snapshot nodes do not include standard, so this is needed.
     # It also includes some duplication with other modules, and should really 
go away.
diff --git a/manifests/site.pp b/manifests/site.pp
index c08bfc1..40ec439 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2320,42 +2320,12 @@
     }
 }
 
-node 'snapshot1001.eqiad.wmnet' {
-    include snapshot
-
-    class { 'admin':
-        groups => [
-            'udp2log-users',
-            'deployment',
-        ],
-    }
-
-    class { 'snapshot::dumps': hugewikis => true }
-    include role::snapshot::common
-}
-node /^snapshot100[24]\.eqiad\.wmnet/ {
+node /^snapshot100[1-4]\.eqiad\.wmnet/ {
+    role snapshot::common
     include snapshot
     include snapshot::dumps
-
-    class { 'admin':
-        groups => [
-            'udp2log-users',
-            'deployment',
-        ],
-    }
-
-    include role::snapshot::common
-}
-node 'snapshot1003.eqiad.wmnet' {
-    include snapshot
-    include snapshot::dumps
-    include role::snapshot::cron::primary
-
-    class { 'admin':
-        groups => [
-            'udp2log-users',
-            'deployment',
-        ],
+    if $::fqdn == 'snapshot1003.eqiad.wmnet' {
+        include role::snapshot::cron::primary
     }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If95c91749d6290ba9dc2e44251a6344f1641c687
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to