Created
May 4, 2016 16:46
-
-
Save billputer/f6cea572f551150c0daf2b467a5d220b to your computer and use it in GitHub Desktop.
Add extra parameters via `cloudsight config`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/defaults/main.yml b/defaults/main.yml | |
index 691f77a..94624c1 100644 | |
--- a/defaults/main.yml | |
+++ b/defaults/main.yml | |
@@ -11,3 +11,4 @@ threatstack_config_dir: '/etc/threatstack' | |
threatstack_config: "{{ threatstack_config_dir }}/tsconfig.json" | |
threatstack_configure_agent: true | |
threatstack_agent_extra_args: | |
+threatstack_agent_config_args: '' | |
diff --git a/tasks/cloudsight_setup.yml b/tasks/cloudsight_setup.yml | |
index a224562..7f639b0 100644 | |
--- a/tasks/cloudsight_setup.yml | |
+++ b/tasks/cloudsight_setup.yml | |
@@ -18,6 +18,20 @@ | |
args: | |
creates: /opt/threatstack/cloudsight/config/.audit | |
+- name: Create file to track extra Cloudsight config | |
+ copy: | |
+ content: "{{ threatstack_agent_config_args }}" | |
+ dest: /opt/threatstack/cloudsight/config/.config_args | |
+ owner: root | |
+ group: root | |
+ mode: 0644 | |
+ register: config_args | |
+ | |
+- name: Configure extra cloudsight parameters | |
+ command: "cloudsight config {{ threatstack_agent_config_args }}" | |
+ when: config_args.changed | |
+ notify: restart cloudsight | |
+ | |
# Test | |
- name: Test cloudsight state | |
service: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment