diff --git a/Deploy_Splunk.yml b/Deploy_Splunk.yml index 1abb157..122853b 100644 --- a/Deploy_Splunk.yml +++ b/Deploy_Splunk.yml @@ -29,4 +29,11 @@ hosts: SVLCTPLOGPUB01.mom.fr tasks: - name: Deploy_Configuration - include_tasks: roles/splunk_deploy/tasks/Deploy_Conf_SHC_BS.yml \ No newline at end of file + include_tasks: roles/splunk_deploy/tasks/Deploy_Conf_SHC_BS.yml + +- name: "ArrĂȘte de fin de deploiement Splunk" + become: yes + hosts: all:!splunk_uf_Linux + tasks: + - name: Deploy_Configuration + include_tasks: roles/splunk_deploy/tasks/Stop_SPL.yml \ No newline at end of file diff --git a/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml b/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml index 9721081..091c6d7 100644 --- a/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml +++ b/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml @@ -8,17 +8,17 @@ owner: splunk group: splunk -- name: "Stop Splunk via cli" - command: "{{ splunk_exec }} stop" - become: yes - become_user: "{{ privileged_user }}" +# - name: "Stop Splunk via cli" +# command: "{{ splunk_exec }} stop" +# become: yes +# become_user: "{{ privileged_user }}" - name: "Enable boot-start Splunk via cli" shell: "/opt/splunk/bin/splunk enable boot-start" become: yes become_user: "{{ privileged_user }}" -# - name: "Start Splunk via cli" -# command: "{{ splunk_exec }} start" -# become: yes -# become_user: "{{ privileged_user }}" \ No newline at end of file + - name: "Start Splunk via cli" + command: "{{ splunk_exec }} start" + become: yes + become_user: "{{ privileged_user }}" \ No newline at end of file diff --git a/roles/splunk_deploy/tasks/Stop_SPL.yml b/roles/splunk_deploy/tasks/Stop_SPL.yml new file mode 100644 index 0000000..b8049b2 --- /dev/null +++ b/roles/splunk_deploy/tasks/Stop_SPL.yml @@ -0,0 +1,4 @@ +- name: "Stop Splunk via cli" + command: "{{ splunk_exec }} stop" + become: yes + become_user: "{{ privileged_user }}" \ No newline at end of file