From 831fcbd17c8e68e73337f4ed9508b3e783979376 Mon Sep 17 00:00:00 2001 From: JocelynPa Date: Mon, 27 Mar 2023 22:28:52 +0200 Subject: [PATCH] Install_Splunk_New-Version --- Deploy_Conf-to-uf.yml | 9 ++------- Deploy_Conf.yml | 9 ++------- install_splunk.yml | 7 ++++++- install_splunk_uf.yml | 12 +++++++++++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Deploy_Conf-to-uf.yml b/Deploy_Conf-to-uf.yml index 3fb4999..5e501e4 100644 --- a/Deploy_Conf-to-uf.yml +++ b/Deploy_Conf-to-uf.yml @@ -11,11 +11,6 @@ group: splunk - name: "Start Splunk via cli" - command: "{{ splunk_exec_uf }} start --accept-license --answer-yes --no-prompt" + command: "{{ splunk_exec_uf }} restart" become: yes - become_user: "{{ splunk_user }}" - - - name: "Start Splunk via cli" - command: "{{ splunk_exec }} enable boot-start" - become: yes - become_user: "{{ splunk_user_uf }}" \ No newline at end of file + become_user: "{{ privileged_user }}" \ No newline at end of file diff --git a/Deploy_Conf.yml b/Deploy_Conf.yml index a438c52..be438a4 100644 --- a/Deploy_Conf.yml +++ b/Deploy_Conf.yml @@ -12,11 +12,6 @@ group: splunk - name: "Start Splunk via cli" - command: "{{ splunk_exec }} start --accept-license --answer-yes --no-prompt" + command: "{{ splunk_exec }} restart" become: yes - become_user: "{{ splunk_user }}" - - - name: "Start Splunk via cli" - command: "{{ splunk_exec }} enable boot-start" - become: yes - become_user: "{{ splunk_user }}" \ No newline at end of file + become_user: "{{ privileged_user }}" \ No newline at end of file diff --git a/install_splunk.yml b/install_splunk.yml index 4d10f0c..eb7afc2 100644 --- a/install_splunk.yml +++ b/install_splunk.yml @@ -5,10 +5,15 @@ when: - splunk_get_fact is not defined + - name: "Start Splunk via cli" + command: "{{ splunk_exec }} start --accept-license --answer-yes --no-prompt" + become: yes + become_user: "{{ privileged_user }}" + - name: "Boot-Start Splunk via cli" command: "{{ splunk_exec }} enable boot-start" become: yes - become_user: root + become_user: "{{ privileged_user }}" - hosts: all_splunk_instances serial: diff --git a/install_splunk_uf.yml b/install_splunk_uf.yml index bf97f91..a3658fe 100755 --- a/install_splunk_uf.yml +++ b/install_splunk_uf.yml @@ -6,7 +6,17 @@ when: - splunk_get_fact is not defined -- hosts: splunk_uf_Linux_TIC + - name: "Start Splunk via cli" + command: "{{ splunk_exec_uf }} start --accept-license --answer-yes --no-prompt" + become: yes + become_user: "{{ privileged_user }}" + + - name: "Boot-Start Splunk via cli" + command: "{{ splunk_exec_uf }} enable boot-start" + become: yes + become_user: "{{ privileged_user }}" + +- hosts: splunk_uf_Linux serial: - 1 - 100%