Andrew Bogott has uploaded a new change for review.

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


Change subject: Replace generic::sysctl::advanced-routing
......................................................................

Replace generic::sysctl::advanced-routing

Now use sysctlfile::advanced-routing

Change-Id: I75beeafe40ef204def5350e3ef72f6c9e94c4b2d
---
M manifests/generic-definitions.pp
M manifests/lvs.pp
M manifests/openstack.pp
A modules/sysctlfile/manifests/advanced-routing.pp
4 files changed, 11 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/74795/1

diff --git a/manifests/generic-definitions.pp b/manifests/generic-definitions.pp
index c27a219..e31c3d4 100644
--- a/manifests/generic-definitions.pp
+++ b/manifests/generic-definitions.pp
@@ -786,22 +786,6 @@
        }
 }
 
-class generic::sysctl::advanced-routing($ensure="present") {
-       if $::lsbdistid == "Ubuntu" and versioncmp($::lsbdistrelease, "10.04") 
>= 0 {
-               file { advanced-routing-sysctl:
-                       name => "/etc/sysctl.d/50-advanced-routing.conf",
-                       owner => root,
-                       group => root,
-                       mode => 0444,
-                       notify => Exec["/sbin/start procps"],
-                       source => 
"puppet:///files/misc/50-advanced-routing.conf.sysctl",
-                       ensure => $ensure
-               }
-       } else {
-               alert("Distribution on $hostname does not support 
/etc/sysctl.d/ files yet.")
-       }
-}
-
 class generic::sysctl::advanced-routing-ipv6($ensure="present") {
        if $::lsbdistid == "Ubuntu" and versioncmp($::lsbdistrelease, "10.04") 
>= 0 {
                file { advanced-routing-sysctl:
diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index b1fb191..be0011d 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -829,7 +829,7 @@
        class { "lvs::realserver": realserver_ips => $service_ips }
 
        # Sysctl settings
-       class { "generic::sysctl::advanced-routing": ensure => absent }
+       class { "sysctlfile::advanced-routing": ensure => absent }
        include generic::sysctl::lvs
 }
 
diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index bf98f4a..96201f5 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -587,7 +587,7 @@
        }
 
        # Enable IP forwarding
-       include generic::sysctl::advanced-routing,
+       include sysctlfile::advanced-routing,
                generic::sysctl::ipv6-disable-ra
 }
 
diff --git a/modules/sysctlfile/manifests/advanced-routing.pp 
b/modules/sysctlfile/manifests/advanced-routing.pp
new file mode 100644
index 0000000..ddb4f88
--- /dev/null
+++ b/modules/sysctlfile/manifests/advanced-routing.pp
@@ -0,0 +1,9 @@
+# sysctl values for 'advanced routing'
+class sysctlfile::advanced-routing($ensure='present') {
+    sysctlfile {'advanced-routing':
+        source => 'puppet:///modules/sysctlfile/50-advanced-routing.conf',
+        number_prefix => '50',
+        ensure => $ensure,
+        notify => Exec["/sbin/start procps"],
+    }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75beeafe40ef204def5350e3ef72f6c9e94c4b2d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to