Skip to content

Commit

Permalink
Merge pull request #21 from MFiederlein/master
Browse files Browse the repository at this point in the history
(feat) added relaygroup to dsa-activate, documentation update pending.
  • Loading branch information
yvon-tm authored Feb 22, 2019
2 parents 023f18a + ea4f7c1 commit 350736f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deep-security-agent/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# 'policy_name' setting.
default['deep_security_agent']['policy_id'] = nil

# The ID of the relay group you want to initialize the agent with.
default['deep_security_agent']['relaygroup_id'] = nil

# Whether to force re-activation even Deep Security Agent has been activated
default['deep_security_agent']['force_reactivation'] = false
5 changes: 5 additions & 0 deletions deep-security-agent/recipes/dsa-activate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
tenant_id = node['deep_security_agent']['tenant_id']
token = node['deep_security_agent']['token']
policy_id = node['deep_security_agent']['policy_id']
relaygroup_id = node['deep_security_agent']['relaygroup_id']

# Activate the agent
Chef::Log.info 'Starting to activate ds_agent.'
Expand All @@ -32,6 +33,10 @@
dsa_args << " \"policyid:#{policy_id}\""
end

if relaygroup_id
dsa_args << " \"relaygroupid:#{relaygroup_id}\""
end

Chef::Log.info "Running dsa_control with args: #{dsa_args}"

currentDSAPlatform = detect_DSA_host_platform()
Expand Down

0 comments on commit 350736f

Please sign in to comment.