Dzahn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343094 )

Change subject: tor: convert to profile/role-structure
......................................................................


tor: convert to profile/role-structure

Convert one more role to new profile/role structure
as described on https://wikitech.wikimedia.org/wiki/Puppet_coding.

This was an easier one than others and compiler shows it's a no-op.

Change-Id: Idd8b446d95c9dd9edf494fc8408e3dc7e3768def
---
R hieradata/role/common/tor_relay.yaml
M manifests/site.pp
R modules/profile/manifests/tor/relay.pp
A modules/role/manifests/tor_relay.pp
4 files changed, 11 insertions(+), 12 deletions(-)

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



diff --git a/hieradata/role/common/tor/relay.yaml 
b/hieradata/role/common/tor_relay.yaml
similarity index 100%
rename from hieradata/role/common/tor/relay.yaml
rename to hieradata/role/common/tor_relay.yaml
diff --git a/manifests/site.pp b/manifests/site.pp
index 84e67bf..7fedd93 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2449,14 +2449,7 @@
 
 # Tor relay
 node 'radium.wikimedia.org' {
-    role(tor::relay)
-
-    include ::base::firewall
-    include ::standard
-
-    interface::add_ip6_mapped { 'main':
-        interface => 'eth0',
-    }
+    role('tor_relay')
 }
 
 node 'radon.wikimedia.org' {
diff --git a/modules/role/manifests/tor/relay.pp 
b/modules/profile/manifests/tor/relay.pp
similarity index 89%
rename from modules/role/manifests/tor/relay.pp
rename to modules/profile/manifests/tor/relay.pp
index 52ffe8e..d2a44a7 100644
--- a/modules/role/manifests/tor/relay.pp
+++ b/modules/profile/manifests/tor/relay.pp
@@ -1,9 +1,9 @@
 # sets up a tor relay
-class role::tor::relay {
+class profile::tor::relay {
 
-    system::role { 'tor::relay':
-        description => 'Tor relay'
-    }
+    system::role { 'tor::relay': description => 'Tor relay' }
+
+    interface::add_ip6_mapped { 'main': interface => 'eth0', }
 
     include passwords::tor
     $controlpassword = $passwords::tor::hashed_control_password
diff --git a/modules/role/manifests/tor_relay.pp 
b/modules/role/manifests/tor_relay.pp
new file mode 100644
index 0000000..94cdfbf
--- /dev/null
+++ b/modules/role/manifests/tor_relay.pp
@@ -0,0 +1,6 @@
+# set up a Tor relay (https://www.torproject.org/)
+class role::tor_relay {
+    include ::standard
+    include ::base::firewall
+    include ::profile::tor::relay
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd8b446d95c9dd9edf494fc8408e3dc7e3768def
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[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