John F. Lewis has uploaded a new change for review.

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

Change subject: mailman: move exim outbound ip config to hiera
......................................................................

mailman: move exim outbound ip config to hiera

Moves the existing hiera config for interface::ip to an array and get the IPs
from the array through a $lists_ip variable. Then adds an array for the host IPs
to be added in a different array (for outbound config).

Move exim4 to use the hiera_array function to get the hiera values allowing it
to join them into the exim4 configuration file.

Tested in labs on mailman-jessie.mailman.eqiad.wmflabs.

Change-Id: Ida732be43f479a2ddf97dfc97da40db2bcf99ace
---
M hieradata/role/common/lists.yaml
M manifests/role/lists.pp
2 files changed, 12 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/232080/1

diff --git a/hieradata/role/common/lists.yaml b/hieradata/role/common/lists.yaml
index ebca662..88abc5c 100644
--- a/hieradata/role/common/lists.yaml
+++ b/hieradata/role/common/lists.yaml
@@ -1,5 +1,8 @@
 standard::has_default_mail_relay: false
-mailman::lists_ipv4: '208.80.154.4'
-mailman::lists_ipv6: '2620:0:861:1::2'
 mailman::lists_servername: 'lists.wikimedia.org'
-
+mailman::lists_ip:
+  - '208.80.154.4'
+  - '2620:0:861:1::2'
+mailman::server_ip:
+  - '208.80.154.61'
+  - '2620:0:861:1:208:80:154:61'
diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp
index 80dac7f..1bff0cd 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -9,26 +9,22 @@
         recipient => '[email protected]',
     }
 
+    $lists_ip = hiera('mailman::lists_ip')
+
     interface::ip { 'lists.wikimedia.org_v4':
         interface => 'eth0',
-        address   => hiera('mailman::lists_ipv4'),
+        address   => $lists_ip[0],
         prefixlen => '32',
     }
 
     interface::ip { 'lists.wikimedia.org_v6':
         interface => 'eth0',
-        address   => hiera('mailman::lists_ipv6'),
+        address   => $lists_ip[1],
         prefixlen => '128',
     }
 
-    $outbound_ips = [
-        '208.80.154.61',
-        '2620:0:861:1:208:80:154:61'
-    ]
-    $list_outbound_ips = [
-        '208.80.154.4',
-        '2620:0:861:1::2'
-    ]
+    $outbound_ips = hiera_array('mailman::server_ip')
+    $list_outbound_ips = hiera_array('mailman::lists_ip')
 
     sslcert::certificate { 'lists.wikimedia.org': }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida732be43f479a2ddf97dfc97da40db2bcf99ace
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis <[email protected]>

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

Reply via email to