From 610c626c7aebeb477217396f590f7b586607d781 Mon Sep 17 00:00:00 2001
From: Temur Maisuradze <temur@grena.ge>
Date: Wed, 24 Feb 2021 15:51:15 +0400
Subject: [PATCH] fix missing configs for stop and start targets

---
 roles/cassandra/tasks/main.yml  | 1 +
 roles/cortex/tasks/main.yml     | 1 +
 roles/haproxy/tasks/main.yml    | 1 +
 roles/keycloak/tasks/main.yml   | 1 +
 roles/misp/tasks/main.yml       | 5 ++++-
 roles/mysql/tasks/main.yml      | 1 +
 roles/nifi/tasks/main.yml       | 1 +
 roles/odfees/tasks/main.yml     | 1 +
 roles/odfekibana/tasks/main.yml | 1 +
 roles/thehive/tasks/main.yml    | 1 +
 soctools.yml                    | 2 +-
 11 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/roles/cassandra/tasks/main.yml b/roles/cassandra/tasks/main.yml
index 86f49a4..0569ae7 100644
--- a/roles/cassandra/tasks/main.yml
+++ b/roles/cassandra/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-cassandra
    - init
 - include: stop.yml
   tags:
diff --git a/roles/cortex/tasks/main.yml b/roles/cortex/tasks/main.yml
index 0ce28c0..a494e3f 100644
--- a/roles/cortex/tasks/main.yml
+++ b/roles/cortex/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-cortex
    - init
 - include: stop.yml
   tags:
diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml
index b93f5ee..d0fb7ab 100644
--- a/roles/haproxy/tasks/main.yml
+++ b/roles/haproxy/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-haproxy
    - init
 - include: stop.yml
   tags:
diff --git a/roles/keycloak/tasks/main.yml b/roles/keycloak/tasks/main.yml
index 657a525..7d7bc16 100644
--- a/roles/keycloak/tasks/main.yml
+++ b/roles/keycloak/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-keycloak
    - init
 - include: stop.yml
   tags: 
diff --git a/roles/misp/tasks/main.yml b/roles/misp/tasks/main.yml
index ce31c84..73e30bc 100644
--- a/roles/misp/tasks/main.yml
+++ b/roles/misp/tasks/main.yml
@@ -6,13 +6,16 @@
 - include: start.yml
   tags:
    - start
+   - start-misp
    - init
 - include: config.yml
   tags:
    - init
    - config
 - include: stop.yml
-  tags: stop
+  tags:
+   - stop
+   - stop-misp
 - include: update-config.yml
   tags:
    - update-config
diff --git a/roles/mysql/tasks/main.yml b/roles/mysql/tasks/main.yml
index 83c2328..7b6d8ee 100644
--- a/roles/mysql/tasks/main.yml
+++ b/roles/mysql/tasks/main.yml
@@ -12,6 +12,7 @@
 - include: start.yml
   tags:
    - start
+   - start-mysql
 - include: stop.yml
   tags:
    - stop
diff --git a/roles/nifi/tasks/main.yml b/roles/nifi/tasks/main.yml
index 9ae0650..5667605 100644
--- a/roles/nifi/tasks/main.yml
+++ b/roles/nifi/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-nifi
    - init
 - include: stop.yml
   tags:
diff --git a/roles/odfees/tasks/main.yml b/roles/odfees/tasks/main.yml
index 50f6080..2e7a390 100644
--- a/roles/odfees/tasks/main.yml
+++ b/roles/odfees/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-odfees
    - init
 - include: stop.yml
   tags:
diff --git a/roles/odfekibana/tasks/main.yml b/roles/odfekibana/tasks/main.yml
index 671f2b9..429925b 100644
--- a/roles/odfekibana/tasks/main.yml
+++ b/roles/odfekibana/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-odfekibana
    - init
 - include: stop.yml
   tags:
diff --git a/roles/thehive/tasks/main.yml b/roles/thehive/tasks/main.yml
index ef9011e..cb0d5d7 100644
--- a/roles/thehive/tasks/main.yml
+++ b/roles/thehive/tasks/main.yml
@@ -6,6 +6,7 @@
 - include: start.yml
   tags:
    - start
+   - start-thehive
    - init
 - include: adminuser.yml
   tags:
diff --git a/soctools.yml b/soctools.yml
index 8074042..2dd3142 100644
--- a/soctools.yml
+++ b/soctools.yml
@@ -10,7 +10,7 @@
 
 - name: Start soctools cluster
   import_playbook: startsoctools.yml
-  when: "'start' in ansible_run_tags or 'config' in ansible_run_tags"
+  when: "'start' in ansible_run_tags or 'config' in ansible_run_tags or 'start-thehive' in ansible_run_tags or 'start-keycloak' in ansible_run_tags or 'start-cortex' in ansible_run_tags or 'start-haproxy' in ansible_run_tags or 'start-cassandra' in ansible_run_tags or 'start-filebeat' in ansible_run_tags or 'start-misp' in ansible_run_tags or 'start-mysql' in ansible_run_tags or 'start-nifi' in ansible_run_tags or 'start-odfees' in ansible_run_tags or 'start-odfekibana' in ansible_run_tags"
 
 - name: Stop soctools cluster
   import_playbook: stopsoctools.yml
-- 
GitLab