Merge pull request #197 from ajroetker/ticket/pdb-1657/master/manage_pg_repos_by_default
(PDB-1657) Manage Postgres repos by default
This commit is contained in:
commit
a078002454
7 changed files with 15 additions and 10 deletions
|
@ -144,6 +144,7 @@ Upgrading
|
|||
Significant parameter changes are listed below:
|
||||
|
||||
* The PuppetDB module now supports PuppetDB 3.0.0 by default
|
||||
* The PuppetDB module now manages Postgres repos by default. To turn this behavior off, set `manage_package_repo` to false.
|
||||
* If you want to use 5.x of the module with PuppetDB 2.x, you'll need to use the new `puppetdb::globals` class to set the version of PuppetDB you're using explicitly. The ability to configure the version has been therefore moved out of the `puppetdb` and `puppetdb::server` classes.
|
||||
For example if your config looked like this before:
|
||||
~~~ruby
|
||||
|
@ -598,11 +599,11 @@ The URL to use for testing if the PuppetDB instance is running. Defaults to `/pd
|
|||
|
||||
####`manage_package_repo`
|
||||
|
||||
if this is true, the official postgres.org repo will be added and postgres won't be installed from the regular repository.
|
||||
If this is true, the official postgres.org repo will be added and postgres won't be installed from the regular repository. This setting defaults to `true`.
|
||||
|
||||
####`postgres_version`
|
||||
|
||||
if the postgres.org repo is installed, you can install several versions of postgres, this currently defaults to 9.4 which is the latest stable version.
|
||||
If the postgres.org repo is installed, you can install several versions of postgres. This currently defaults to 9.4 which is the latest stable version.
|
||||
|
||||
Implementation
|
||||
---------------
|
||||
|
|
|
@ -11,11 +11,9 @@ class puppetdb::database::postgresql(
|
|||
) inherits puppetdb::params {
|
||||
|
||||
if $manage_server {
|
||||
if $manage_package_repo {
|
||||
class { '::postgresql::globals':
|
||||
manage_package_repo => true,
|
||||
version => $postgres_version,
|
||||
}
|
||||
class { '::postgresql::globals':
|
||||
manage_package_repo => $manage_package_repo,
|
||||
version => $postgres_version,
|
||||
}
|
||||
# get the pg server up and running
|
||||
class { '::postgresql::server':
|
||||
|
|
|
@ -15,7 +15,7 @@ class puppetdb::params inherits puppetdb::globals {
|
|||
$puppetdb_version = $puppetdb::globals::version
|
||||
$database = $puppetdb::globals::database
|
||||
$manage_dbserver = true
|
||||
$manage_pg_repo = false
|
||||
$manage_pg_repo = true
|
||||
$postgres_version = '9.4'
|
||||
|
||||
# The remaining database settings are not used for an embedded database
|
||||
|
|
|
@ -11,6 +11,8 @@ describe 'puppetdb', :type => :class do
|
|||
:operatingsystemrelease => '6.0',
|
||||
:kernel => 'Linux',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:lsbdistid => 'Debian',
|
||||
:lsbdistcodename => 'foo',
|
||||
:id => 'root',
|
||||
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ describe 'puppetdb::master::config', :type => :class do
|
|||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => '6.0',
|
||||
:kernel => 'Linux',
|
||||
:lsbdistid => 'Debian',
|
||||
:lsbdistcodename => 'foo',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:id => 'root',
|
||||
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
|
|
|
@ -8,6 +8,8 @@ describe 'puppetdb::master::puppetdb_conf', :type => :class do
|
|||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:operatingsystemrelease => '6.0',
|
||||
:lsbdistid => 'Debian',
|
||||
:lsbdistcodename => 'foo',
|
||||
:kernel => 'Linux',
|
||||
:concat_basedir => '/var/lib/puppet/concat',
|
||||
:id => 'root',
|
||||
|
|
Loading…
Reference in a new issue