Skip to content

Commit

Permalink
Merge pull request #33 from olhado/fix_service
Browse files Browse the repository at this point in the history
Fix an issue where if the formula was not configuring the agent, it wo…
  • Loading branch information
olhado authored Apr 29, 2021
2 parents 0a6bee3 + 404bba1 commit 14605bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ platforms:
- yum install -y audit initscripts
- sed -i 's/local_events = yes/local_events = no/g' /etc/audit/auditd.conf
- systemctl enable auditd.service
image: centos:7
- name: centos-7
image: centos:7
driver_config:
Expand Down
10 changes: 9 additions & 1 deletion threatstack/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,19 @@ tsagent-config:
# NOTE: We do not signal the cloudsight service to restart via the package
# resource because the workflow differs between fresh installation and
# upgrades. The package scripts will handle this.
#
# We only enable the service if `ts_configure_agent` is True, because if
# the agent isn't configured, starting up the agent will fail
{% if pillar['ts_configure_agent'] is not defined or pillar['ts_configure_agent'] == True %}
threatstack:
service.running:
- enable: True
- restart: True
{% if pillar['ts_agent_config_args'] is defined %}
{% if pillar['ts_agent_config_args'] is defined %}
- watch:
- cmd: tsagent-config
{% endif %}
{% else %}
threatstack:
service.enabled
{% endif %}

0 comments on commit 14605bc

Please sign in to comment.