Skip to content

Commit ef56319

Browse files
committed
If we're not using logstash, don't ask where the shipper is.
1 parent 377c675 commit ef56319

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client.sls

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
import random
44

5-
shipper_hosts = __salt__['publish.publish']('role:logstash.shipper', 'grains.item', 'id', 'grain').keys()
6-
shipper_host = random.choice(shipper_hosts)
7-
85
state('rsyslog')\
96
.service.running(
107
enable=True,
@@ -13,6 +10,8 @@ state('rsyslog')\
1310

1411
config = '/etc/rsyslog.d/00-logstash.conf'
1512
if __grains__.get('log_to_logstash', False): # By default, not to Logstash
13+
shipper_hosts = __salt__['publish.publish']('role:logstash.shipper', 'grains.item', 'id', 'grain').keys()
14+
shipper_host = random.choice(shipper_hosts)
1615
state(config)\
1716
.file.managed(
1817
source='salt://logstash/files{}'.format(config),

0 commit comments

Comments
 (0)