From f6aa812be86c0ecb966bc77bcd31d7824635f879 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 8 Sep 2019 09:29:00 +0200 Subject: [PATCH] Only setup ssh in static_source if we are not also a static_master --- modules/roles/manifests/static_source.pp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/roles/manifests/static_source.pp b/modules/roles/manifests/static_source.pp index 3ff15e89f..960366cf9 100644 --- a/modules/roles/manifests/static_source.pp +++ b/modules/roles/manifests/static_source.pp @@ -4,9 +4,16 @@ class roles::static_source { include roles::static::base - # sources talk only to masters - class { 'roles::static::ssh': - add_tag => 'staticsync-master', - collect_tag => 'staticsync-source', + if ! defined(Class["roles::static_master"]) { + # sources talk only to masters, but only set this up if we are not + # *also* a static master since we cannot have two meaningful roles::static:ssh + # instances in the current setup. + # + # this adds the limitation that the master of any component whose source is also a + # master node needs to have that same host as its master and not some other one. + class { 'roles::static::ssh': + add_tag => 'staticsync-master', + collect_tag => 'staticsync-source', + } } } -- 2.20.1