summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2017-04-27 10:01:40 -0400
committerMatthew Treinish <mtreinish@kortar.org>2017-04-27 10:05:47 -0400
commit35025f8df5576718389f9d7da3e8865acc70710a (patch)
tree6131dbe4fac3e285e77e3925558b68665c58f180
parent4037e7b1ba93fbef0414d6b0adefd18e1076d910 (diff)
Move paho-mqtt package install to worker node
The paho-mqtt package is only ever needed on the worker because that is what emits mqtt. However by putting it in init this also gets installed on the server node. Additionally this commit adds a duplication check around the package because it's possible that something else in another module will conflict with paho-mqtt as we start adding mqtt to more services. Change-Id: Id0308d2d4d1843fcca73f459cffa2ae944bebd0c
Notes
Notes (review): Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Workflow+1: Jeremy Stanley <fungi@yuggoth.org> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 28 Apr 2017 20:32:07 +0000 Reviewed-on: https://review.openstack.org/460570 Project: openstack-infra/puppet-subunit2sql Branch: refs/heads/master
-rw-r--r--manifests/init.pp6
-rw-r--r--manifests/worker.pp7
2 files changed, 7 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 743707d..5e2302d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -33,12 +33,6 @@ class subunit2sql (
33 require => Class['pip'], 33 require => Class['pip'],
34 } 34 }
35 35
36 package {'paho-mqtt':
37 ensure => latest,
38 provider => openstack_pip,
39 require => Class['pip'],
40 }
41
42 package { 'subunit2sql': 36 package { 'subunit2sql':
43 ensure => latest, 37 ensure => latest,
44 provider => openstack_pip, 38 provider => openstack_pip,
diff --git a/manifests/worker.pp b/manifests/worker.pp
index 1873f24..96b4bb9 100644
--- a/manifests/worker.pp
+++ b/manifests/worker.pp
@@ -31,6 +31,13 @@ define subunit2sql::worker (
31 ensure => absent, 31 ensure => absent,
32 } 32 }
33 } 33 }
34 if ! defined(Package['paho-mqtt']) {
35 package {'paho-mqtt':
36 ensure => latest,
37 provider => openstack_pip,
38 require => Class['pip'],
39 }
40 }
34 41
35 if ! defined(User['subunit']) { 42 if ! defined(User['subunit']) {
36 user { 'subunit': 43 user { 'subunit':