Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344176 )

Change subject: postgresql - drop support for postgis 1.5
......................................................................

postgresql - drop support for postgis 1.5

it seems that all our postgresql databases have upgraded to postgis > 1.5,
we can now drop some code...

Change-Id: If8c72e8af8d4a55a4ca8dd091f7a0fa54a797451
---
M modules/postgresql/manifests/spatialdb.pp
1 file changed, 7 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/344176/1

diff --git a/modules/postgresql/manifests/spatialdb.pp 
b/modules/postgresql/manifests/spatialdb.pp
index 68af3e7..37f5b8b 100644
--- a/modules/postgresql/manifests/spatialdb.pp
+++ b/modules/postgresql/manifests/spatialdb.pp
@@ -39,51 +39,14 @@
             user    => 'postgres',
             unless  => $db_exists,
         }
-        if $postgis_version == '1.5' {
-            exec { "create_plpgsql_lang-${name}":
-                command => "/usr/bin/createlang plpgsql ${name}",
-                user    => 'postgres',
-                unless  => $plpgsql_exists,
-            }
-            exec { "create_postgis-${name}":
-                command => "/usr/bin/psql -d ${name} -f 
${postgres_basedir}/contrib/postgis-${postgis_version}/postgis.sql",
-                user    => 'postgres',
-                unless  => $postgis_exists,
-            }
-            # Create spatial_ref_sys
-            exec { "create_spatial_ref_sys-${name}":
-                command     => "/usr/bin/psql -d ${name} -f 
${postgres_basedir}/contrib/postgis-${postgis_version}/spatial_ref_sys.sql",
-                user        => 'postgres',
-                refreshonly => true,
-                subscribe   => Exec["create_postgis-${name}"],
-            }
-            exec { "grant_ref_sys_cmd-${name}":
-                command     => "/usr/bin/psql -d ${name} -c \"GRANT SELECT ON 
spatial_ref_sys TO PUBLIC;\"",
-                user        => 'postgres',
-                refreshonly => true,
-                subscribe   => Exec["create_spatial_ref_sys-${name}"],
-            }
-            exec { "create_comments-${name}":
-                command     => "/usr/bin/psql -d ${name} -f 
${postgres_basedir}/contrib/postgis_comments.sql",
-                user        => 'postgres',
-                refreshonly => true,
-                subscribe   => Exec["create_spatial_ref_sys-${name}"],
-            }
-            # Create comments
-            exec { "grant_comments_cmd-${name}":
-                command     => "/usr/bin/psql -d ${name} -c \"GRANT ALL ON 
geometry_columns TO PUBLIC;\"",
-                user        => 'postgres',
-                refreshonly => true,
-                subscribe   => Exec["create_comments-${name}"],
-            }
-        } else {
-            exec { "create_postgis-${name}":
-                command     => "/usr/bin/psql -d ${name} -c \"CREATE EXTENSION 
postgis;\"",
-                user        => 'postgres',
-                refreshonly => true,
-                subscribe   => Exec["create_db-${name}"],
-            }
+
+        exec { "create_postgis-${name}":
+            command     => "/usr/bin/psql -d ${name} -c \"CREATE EXTENSION 
postgis;\"",
+            user        => 'postgres',
+            refreshonly => true,
+            subscribe   => Exec["create_db-${name}"],
         }
+
         exec { "create_extension_hstore-${name}":
             command     => "/usr/bin/psql -d ${name} -c \"CREATE EXTENSION 
hstore;\"",
             user        => 'postgres',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8c72e8af8d4a55a4ca8dd091f7a0fa54a797451
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>

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

Reply via email to