From f8c519e8f9a4750b49f6dab9b90a3255b01a419e Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Mon, 13 Apr 2015 12:25:54 +0200 Subject: [PATCH] Decouple openstack_project::server from puppetdb class Story: 2000172 Spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/server_base_template_refactor.html Change-Id: I3e8e97fab635f0ea5ac54636c7cb4d44a426c29e --- manifests/site.pp | 7 +++++-- modules/openstack_project/manifests/puppetdb.pp | 14 +------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index e281a5a2c5..1c5733e0e6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -223,9 +223,12 @@ node 'puppetmaster.openstack.org' { # Node-OS: precise node 'puppetdb.openstack.org' { - class { 'openstack_project::puppetdb': - sysadmins => hiera('sysadmins', []), + $open_ports = [8081, 80] + class { 'openstack_project::server': + iptables_public_tcp_ports => $open_ports, + sysadmins => hiera('sysadmins', []), } + include openstack_project::puppetdb } # Node-OS: precise diff --git a/modules/openstack_project/manifests/puppetdb.pp b/modules/openstack_project/manifests/puppetdb.pp index bc010c0b9b..cb9f3ee9e5 100644 --- a/modules/openstack_project/manifests/puppetdb.pp +++ b/modules/openstack_project/manifests/puppetdb.pp @@ -1,7 +1,6 @@ # == Class: openstack_project::puppetdb # class openstack_project::puppetdb ( - $sysadmins = [], $puppetboard = true, ) { @@ -20,18 +19,7 @@ class openstack_project::puppetdb ( system => true, } - if $puppetboard { - $open_ports = [8081, 80] - } else { - $open_ports = [8081] - } - - class { 'openstack_project::server': - iptables_public_tcp_ports => $open_ports, - sysadmins => $sysadmins, - } - - class { '::puppetdb::database::postgresql': + class { 'puppetdb::database::postgresql': require => [User['postgres'], Class['openstack_project::template'],], }