Permalink
Browse files

Pass 'manage_redhat_firewall' param through to postgres

Prior to this commit, if you allowed the puppetdb module
to manage postgres for you, it would always try to manage
the firewall for the postgres port on redhat systems.

This commit exposes that as a parameter in a few more
spots, and passes it through to the postgres module.
  • Loading branch information...
1 parent 79f9190 commit f21740b69917233bb12a784a14c34bdd675ae5ab Chris Price committed Sep 21, 2012
Showing with 15 additions and 11 deletions.
  1. +1 −1 Modulefile
  2. +1 −1 README.md
  3. +3 −2 manifests/database/postgresql.pp
  4. +8 −5 manifests/init.pp
  5. +2 −2 manifests/server/firewall.pp
View
@@ -1,5 +1,5 @@
name 'puppetlabs-puppetdb'
-version '1.0.1'
+version '1.0.3'
source 'git://github.com/puppetlabs-puppet/puppetlabs-puppetdb.git'
author 'Puppet Labs'
description 'PuppetDB resource types'
View
@@ -3,7 +3,7 @@ puppetlabs-puppetdb
Purpose: Install and manage the PuppetDB server and database, and
configure the Puppet master to use PuppetDB
-Module: puppetlabs/puppetdb (http://forge.puppetlabs.com/cprice404/puppetdb)
+Module: puppetlabs/puppetdb (http://forge.puppetlabs.com/puppetlabs/puppetdb)
Puppet Version: 2.7+
Platforms: RHEL6, Debian6, Ubuntu 10.04
@@ -33,7 +33,8 @@
#
class puppetdb::database::postgresql(
# TODO: expose more of the parameters from `inkling/postgresql`!
- $listen_addresses = $puppetdb::params::database_host,
+ $listen_addresses = $puppetdb::params::database_host,
+ $manage_redhat_firewall = $puppetdb::params::manage_redhat_firewall,
) inherits puppetdb::params {
# get the pg server up and running
@@ -42,7 +43,7 @@
# TODO: make this stuff configurable
'ip_mask_allow_all_users' => '0.0.0.0/0',
'listen_addresses' => $listen_addresses,
- 'manage_redhat_firewall' => true,
+ 'manage_redhat_firewall' => $manage_redhat_firewall,
},
}
View
@@ -38,18 +38,21 @@
# TODO: expose more parameters
#
class puppetdb(
- $database = $puppetdb::params::database,
- $puppetdb_version = $puppetdb::params::puppetdb_version,
+ $database = $puppetdb::params::database,
+ $puppetdb_version = $puppetdb::params::puppetdb_version,
+ $manage_redhat_firewall = $puppetdb::params::manage_redhat_firewall,
) inherits puppetdb::params {
class { 'puppetdb::server':
- database => $database,
- puppetdb_version => $puppetdb_version,
+ database => $database,
+ puppetdb_version => $puppetdb_version,
+ manage_redhat_firewall => $manage_redhat_firewall,
}
if ($database == 'postgres') {
class { 'puppetdb::database::postgresql':
- before => Class['puppetdb::server']
+ manage_redhat_firewall => $manage_redhat_firewall,
+ before => Class['puppetdb::server']
}
}
}
@@ -7,13 +7,13 @@
# TODO: the firewall module should be able to handle this itself
if ($manage_redhat_firewall and $puppetdb::params::firewall_supported) {
- exec { 'persist-firewall':
+ exec { 'puppetdb-persist-firewall':
command => $puppetdb::params::persist_firewall_command,
refreshonly => true,
}
Firewall {
- notify => Exec['persist-firewall']
+ notify => Exec['puppetdb-persist-firewall']
}
firewall { "${port} accept - puppetdb":

0 comments on commit f21740b

Please sign in to comment.