From 6ab682ad49c47b165f7bf061bbdeaaea421708b1 Mon Sep 17 00:00:00 2001 From: JocelynPa Date: Fri, 21 Apr 2023 12:44:58 +0200 Subject: [PATCH] ... --- Copy_keys.yml | 7 ++++++- Test_for_trusted.yml | 8 ++++++++ roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml | 8 ++++---- roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 Test_for_trusted.yml diff --git a/Copy_keys.yml b/Copy_keys.yml index 620ef18..d9046b2 100644 --- a/Copy_keys.yml +++ b/Copy_keys.yml @@ -9,4 +9,9 @@ src: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" dest: /opt/splunk/etc/auth/distServerKeys/SVLCTPLOGSUP01.mom.fr/ owner: root - group: root \ No newline at end of file + group: root + + - name: "Start Splunk via cli" + command: "{{ splunk_exec }} start" + become: yes + become_user: "{{ privileged_user }}" \ No newline at end of file diff --git a/Test_for_trusted.yml b/Test_for_trusted.yml new file mode 100644 index 0000000..cd67771 --- /dev/null +++ b/Test_for_trusted.yml @@ -0,0 +1,8 @@ +--- +- name: activation du distributed search + become: yes + become_user: "{{ privileged_user }}" + hosts: all:!splunk_uf_linux:!splunk_uf_windows + tasks: + - name: commande d'activation + command: "{{ splunk_exec }} add search-server https://{{ hosts }}:8089 -auth admin:password -remoteUsername adminsplunk -remotePassword 921223Jocpam!?" \ 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 e794ed3..9721081 100644 --- a/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml +++ b/roles/splunk_deploy/tasks/Deploy_Conf-to-Splunk.yml @@ -18,7 +18,7 @@ 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/Deploy_Conf_DSMC.yml b/roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml index 76a9bbf..f8d5d4a 100644 --- a/roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml +++ b/roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml @@ -42,6 +42,6 @@ owner: splunk group: splunk - name: "Restart Splunk via cli" - command: "{{ splunk_exec }} restart" + command: "{{ splunk_exec }} start" become: yes become_user: "{{ privileged_user }}" \ No newline at end of file