Skip to content

Commit 14605bc

Browse files
authored
Merge pull request #33 from olhado/fix_service
Fix an issue where if the formula was not configuring the agent, it wo…
2 parents 0a6bee3 + 404bba1 commit 14605bc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.kitchen.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ platforms:
6969
- yum install -y audit initscripts
7070
- sed -i 's/local_events = yes/local_events = no/g' /etc/audit/auditd.conf
7171
- systemctl enable auditd.service
72-
image: centos:7
7372
- name: centos-7
7473
image: centos:7
7574
driver_config:

threatstack/init.sls

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,19 @@ tsagent-config:
139139
# NOTE: We do not signal the cloudsight service to restart via the package
140140
# resource because the workflow differs between fresh installation and
141141
# upgrades. The package scripts will handle this.
142+
#
143+
# We only enable the service if `ts_configure_agent` is True, because if
144+
# the agent isn't configured, starting up the agent will fail
145+
{% if pillar['ts_configure_agent'] is not defined or pillar['ts_configure_agent'] == True %}
142146
threatstack:
143147
service.running:
144148
- enable: True
145149
- restart: True
146-
{% if pillar['ts_agent_config_args'] is defined %}
150+
{% if pillar['ts_agent_config_args'] is defined %}
147151
- watch:
148152
- cmd: tsagent-config
153+
{% endif %}
154+
{% else %}
155+
threatstack:
156+
service.enabled
149157
{% endif %}

0 commit comments

Comments
 (0)