diff --git a/Deploy_Conf.yml b/Deploy_Conf.yml index 35ef11a..44f24a3 100644 --- a/Deploy_Conf.yml +++ b/Deploy_Conf.yml @@ -48,4 +48,15 @@ src: "{{ playbook_dir }}/Apps_for_Splunk/01-Conf_deploy_client" dest: /opt/splunk/etc/apps/ owner: splunk - group: splunk \ No newline at end of file + group: splunk + + - name: "Start Splunk via cli" + command: "{{ splunk_exec }} start --accept-license --answer-yes --no-prompt" + become: yes + become_user: "{{ splunk_user }}" + register: start_splunk + changed_when: start_splunk.rc == 0 and 'already running' not in start_splunk.stdout + when: + - not splunk_enable_service or pid1 is not defined + - splunk_status.rc != 0 + ignore_errors: yes \ No newline at end of file