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
This commit is contained in:
Matthew Treinish 2017-04-27 10:01:40 -04:00
parent 4037e7b1ba
commit 35025f8df5
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
2 changed files with 7 additions and 6 deletions

View File

@ -33,12 +33,6 @@ class subunit2sql (
require => Class['pip'],
}
package {'paho-mqtt':
ensure => latest,
provider => openstack_pip,
require => Class['pip'],
}
package { 'subunit2sql':
ensure => latest,
provider => openstack_pip,

View File

@ -31,6 +31,13 @@ define subunit2sql::worker (
ensure => absent,
}
}
if ! defined(Package['paho-mqtt']) {
package {'paho-mqtt':
ensure => latest,
provider => openstack_pip,
require => Class['pip'],
}
}
if ! defined(User['subunit']) {
user { 'subunit':