diff --git a/install_splunk_uf.yml b/install_splunk_uf.yml index bf833ba..fc0453b 100755 --- a/install_splunk_uf.yml +++ b/install_splunk_uf.yml @@ -14,18 +14,6 @@ - splunk_common_uf tags: all,installation -- hosts: splunk_uf_Linux - tasks: - - 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: localhost connection: local tasks: diff --git a/roles/splunk_deploy_uf_lin/tasks/Deploy_Conf-to-uf.yml b/roles/splunk_deploy_uf_lin/tasks/Deploy_Conf-to-uf.yml index c50af91..b155d3a 100644 --- a/roles/splunk_deploy_uf_lin/tasks/Deploy_Conf-to-uf.yml +++ b/roles/splunk_deploy_uf_lin/tasks/Deploy_Conf-to-uf.yml @@ -7,7 +7,17 @@ owner: splunk group: splunk +- name: "Stop Splunk via cli" + command: "{{ splunk_exec_uf }} stop" + become: yes + become_user: "{{ splunk_user }}" + +- name: "Enable boot-start Splunk via cli" + command: "{{ splunk_exec_uf }} enable boot-start" + become: yes + become_user: "{{ privileged_user }}" + - name: "Start Splunk via cli" - command: "{{ splunk_exec_uf }} restart" + command: "{{ splunk_exec_uf }} start" become: yes become_user: "{{ privileged_user }}" \ No newline at end of file