Commit graph

426 commits

Author SHA1 Message Date
Ondrej Prazak
b2cb2dfff0 Adds timestamps into logs by default 2016-04-05 10:59:22 +02:00
Hunter Haugen
35bfae5230 Remove unused variable and update template comment 2016-03-04 16:15:57 -08:00
Bryan Jen
f1bd5a9063 Merge pull request #747 from cyberious/default_connect_settings
Fix issues with missing parameters in `server` class
2016-03-01 12:10:05 -07:00
Travis Fields
740c0b3b40 Update postgresql::globals::default_connect_settings and default to {}
- Add missing parameter `default_connect_settings` to class `postgresql::server`
  which was required by all of the classes and actually would have failed if the
  tests where not masking the issue
- Remove test param that was masking the issue
2016-03-01 09:47:44 -08:00
Michael Moll
ef94a2c51d Ubuntu/vidid and newer use systemd 2016-02-23 14:22:51 +01:00
Bryan Jen
8464e33222 Merge pull request #738 from icetrain/master
Add missing onlyif_function to sequence grant code
2016-02-17 14:58:01 -07:00
Helen
0b24b265c5 Merge pull request #734 from gfokkema/master
Archlinux service reload parameter is incorrect.
2016-02-15 12:31:22 +00:00
icetrain
abd6c6fe07 Add missing onlyif_function to sequence grant code 2016-02-15 13:21:42 +01:00
Helen
577299f289 Merge pull request #731 from shawn-sterling/amazon-version-workaround
amazon linux defaults to postgresql92 now
2016-02-15 12:09:18 +00:00
Aselinux
a690089f89 postgres server init script naming on amazon linux ami
On current amazon linux ami (details below), and open puppet (details below), the postgres module (installed as part of puppetlabs/puppetdb) currently, tries to start postgressql server with /etc/init.d/postgresql9.4 , while the init script doesn't have the dot in the version number, so it needs to use /etc/init.d/postgresql94

From what I see in all available postgresql server rpms, currently on amazon linux ami, seems all the init scripts of postgresql doesn't have a dot in the suffix version number.

Supporting info:

[root@puppet ~]# yum list postgres* | grep 'server\.'; 
postgresql94-server.x86_64            9.4.5-1.63.amzn1        @amzn-updates     
postgresql8-server.x86_64             8.4.20-4.51.amzn1       amzn-updates      
postgresql92-server.x86_64            9.2.14-1.56.amzn1       amzn-updates      
postgresql93-server.x86_64            9.3.10-1.60.amzn1       amzn-updates      

for i in postgresql8-server.x86_64 postgresql92-server.x86_64 postgresql93-server.x86_64 postgresql94-server.x86_64; do echo $i; repoquery -l $i | grep init.d; done

postgresql8-server.x86_64
/etc/rc.d/init.d/postgresql
postgresql92-server.x86_64
/etc/rc.d/init.d/postgresql92
postgresql93-server.x86_64
/etc/rc.d/init.d/postgresql93
postgresql94-server.x86_64

[root@puppet ~]# puppet --version
4.3.2
[root@puppet ~]# rpm -qa | grep puppet | grep server
puppetserver-2.2.1-1.el6.noarch
[root@puppet ~]# 
[root@puppet ~]# cat /etc/os-release 
NAME="Amazon Linux AMI"
VERSION="2015.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2015.09"
PRETTY_NAME="Amazon Linux AMI 2015.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2015.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
[root@puppet ~]# 
[root@puppet ~]# cat /etc/system-release
Amazon Linux AMI release 2015.09
2016-02-12 01:27:02 +00:00
Gerlof Fokkema
8db810e268 $service_provider statement doesn't seem to do anything.
The cause turned out to be a misconfigured setting for OS type
Archlinux.
2016-02-09 19:29:52 +01:00
Andreas Ntaflos
dc62d48a5b Correctly set $service_provider
The `$service_provider` variable in params.pp is user-definable via `postgresql::globals::service_provider`. Thus params.pp should reference that variable correctly, like other variables from globals.pp.
2016-02-09 17:42:53 +01:00
Shawn Sterling
feb7f05271 amazon linux defaults to postgresql92 now, this workaround will let it install 2016-02-03 16:05:56 -08:00
Bryan Jen
6f5002aa0e Merge pull request #719 from matonb/psql_port
Fix password change failing
2016-02-03 11:40:00 -07:00
Hunter Haugen
f7dfa262dc Merge pull request #727 from supercow/quote_owner
(MODULES-3024) Quote database objects when creating databases
2016-02-01 15:23:14 -08:00
James Sweeny
5354d0f1ea (MODULES-3024) Quote database objects when creating databases
Prior to this commit, when creating databases with a name or owner that has
characters which must be quoted (e.g., "pe-postgres"), the postgresql::server::database define
fails due to a SQL syntax error.
2016-02-01 17:58:55 -05:00
Brett Maton
d71e3f754d Fix password change failing
postgres db user password change failing when postgres is listening on non standard port number.
2016-01-30 19:01:02 +00:00
Erik Anderson
4cddd80245 Schedule apt update after install of repo 2016-01-29 16:20:20 -07:00
Hunter Haugen
a6ccfb217e (MODULES-2968) Add default postgis version for 9.5
This commit also updates the logic that determines the postgis version
so that if version association is missing in the future, it will still
compile.
2016-01-27 15:34:22 -08:00
Sebastian Reitenbach
aa044ba295 OpenBSD 5.9 will also ship a PostgreSQL 9.4 version 2015-12-21 23:36:00 +01:00
David Schmitt
f0d52e6cc6 Merge pull request #711 from phervieux/15.10
Add support for Ubuntu 15.10
2015-12-15 14:54:01 +00:00
Fabrizio Regini
95aa691c62 fix quote around locale options 2015-11-29 13:18:46 +01:00
TP Honey
721c162b50 Merge pull request #704 from downsj2/master
Fix default paths for Amazon Linux
2015-11-19 19:50:52 +00:00
Jason Downs
9f0141f955 Fix paths to work on Amazon Linux, update unit test 2015-11-19 11:06:19 -08:00
Hunter Haugen
807440095b Merge pull request #679 from vicinus/master
removed inherits postgresql::params
2015-11-19 10:16:55 -08:00
Oriol Demaria
244097c942 OpenBSD version is now 9.4 2015-11-10 20:33:34 +00:00
Patrick Hervieux
2f9cf7be4f Add support for Ubuntu 15.10 2015-11-04 16:13:32 +01:00
Stijn Tintel
2f46f6fd25 Use double qoutes around database name.
When using a database name that contains dashes or underscores, the
CREATE DATABASE statement fails with a syntax error. Use double quotes
around the database name to solve this.
2015-10-28 18:17:52 +02:00
David Schmitt
c7c839347f Merge pull request #700 from BobVanB/master
syntax error near UTF8
2015-10-08 12:28:42 +01:00
Stefan Warten
e8c661e207 Added parameter description in README, before-relation if restart_on_change is false, and unit tests for both conditions of the parameter 2015-10-07 16:24:41 +02:00
Bob van Bokkem
fad4c164ab syntax error near UTF8 2015-09-30 14:25:45 +02:00
Stefan Warten
626433a125 Added parameter to disable automatic service restarts on config changes 2015-09-29 10:41:16 +02:00
Stefan Warten
ea9203dd1a Added parameter to disable automatic service restarts on config changes 2015-09-29 10:11:28 +02:00
Javier Wilson
56b119fc62 fedora 22 postgresql version 9.4 2015-09-23 13:15:39 -07:00
Bryan Jen
0ffbcc0a5c Merge pull request #693 from frconil/master
Fixes MODULES_2059 - adds extension argument
2015-09-09 15:21:09 -07:00
François Conil
c1f4530634 Fixes MODULES_2059 - adds extension argument
This adds the ability to define the extension name separately from the
"title" of the resource, which allows you to add the extension to more
than one database.

As per the original ticket, extensions in postgresql can be defined on
a per database basis. By using the same name for both the extension and
the instance of postgresql::server::extension, you're getting duplicates
errors if you try to assign an extension to more than one database
2015-09-09 14:26:41 +10:00
Daniel Bäurer
b9b67951e1 Change apt::pin to apt_postgresql_org to prevent error message "wrong
file extension".
2015-09-04 23:35:59 +02:00
David Schmitt
e42d787141 Merge pull request #677 from cavaliercoder/master
(MODULES-2211) Fixed systemd-override for RedHat systems with unmanaged Yum repos
2015-09-01 08:06:43 +01:00
Tom Hey
6a29636155 (MODULES-661) Remote DB support
Adds connection-settings (for remote DB support) when creating DB resources.

Connection-settings allows a hash of options that can be used
when connecting the a remote DB (such as PGHOST, PGPORT, PGPASSWORD
PGSSLKEY) and a special option DBVERSION indicating the version
of the remote database.

Including
- Puppet updates
- Documentation updates
- RSpec unit test updates
- RSpec acceptance test updates
- Some test coverage for connection-settings
- Working acceptance test...
    Basic vagrant setup:
    * Two boxes, server and client
    * Runs puppet code to on server to setup a postgres server that allows all connections and md5 connections, creates db puppet to look at
    * Runs puppet code on client to make a server that a psql command can be run against puppet db on other server
    * Does some fancy stuff to get the fact of the IP from the first server to connect to
- Backwards compatible, with deprecation warnings around old parameters
2015-08-27 11:03:18 +01:00
vicinus
15071237e1 removed inherits postgresql::params
inheriting postgresql::params creates a cycle, because postgresql::repo gets instantiated in postgresql::globals which is inherited by postgresql::params. Also postgresql::params are not needed, because only version is used by postgresql::repo, postgresql::repo::yum_postgresql_org and postgresql::repo::apt_postgresql_org and it get set in postgresql::globals by a resource like class instantiation.
2015-08-19 18:23:50 +02:00
David Schmitt
213bb754a0 Merge pull request #672 from GoozeyX/addproxyoption
Add proxy option for yum repositories
2015-08-12 17:25:25 +01:00
Alexander Brovman
1eb45d07f1 adding proxy option for yum repositories 2015-08-12 14:42:32 +02:00
David Schmitt
4b9363417b Merge pull request #678 from npwalker/modules_2321_improve_pg_hba_rule
Decouple pg_hba_rule from postgresql::server
2015-08-12 10:32:04 +01:00
Nick Walker
25c1bae73a Decouple pg_hba_rule from postgresql::server
This change allows the pg_hba_rule defined type to be used
even if you have not included postgresql::server.

By default it will continue with the same behavior as before,
however, you can now specify some extra parameters that were
previously coming directly from postgresql::server
2015-08-11 11:47:27 -07:00
JT (Jonny)
7981b0950e Merge pull request #671 from sanoma-technology/master
Allow for undefined PostGIS version.
2015-08-10 15:40:41 +01:00
Ryan Armstrong
f929cadd9c (MODULES-2211) Fixed systemd-override for RedHat systems with unmanaged Yum repos
This change lets the params class compute the name of the correct systemd unit file
via $service_name.
2015-07-29 16:53:00 +08:00
Christian Kaenzig
1956881b2b Fix postgis default package name on RedHat
The /5/ regex on $::operatingsystemrelease would match any distro release
with a 5 in it, including for example Centos "7.1.1503". Given the commit
message for this regex, it was meant to match RedHat / Centos 5.x.
2015-07-23 09:59:36 +02:00
Steve Maddison
cda13dfd66 Allow for undefined PostGIS version. 2015-07-10 13:19:19 +02:00
David Schmitt
00322bdad7 Merge pull request #615 from tampakrap/opensuse_defaults
Add default values for more openSUSE and SLES distro versions
2015-07-03 09:50:06 +01:00
Theo Chatzimichos
5ddc88992b Add default values for more openSUSE and SLES distro versions 2015-07-02 20:58:38 +02:00