diff --git a/Deploy_Splunk.yml b/Deploy_Splunk.yml index ab23a56..1abb157 100644 --- a/Deploy_Splunk.yml +++ b/Deploy_Splunk.yml @@ -12,4 +12,21 @@ hosts: splunk_deployement tasks: - name: Deploy_Configuration - include_tasks: roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml \ No newline at end of file + include_tasks: roles/splunk_deploy/tasks/Deploy_Conf_DSMC.yml + +- name: "Deploy Configuration Initial SHC" + become: yes + become_user: "{{ privileged_user }}" + hosts: splunk_search_head + tasks: + - name: Deploy_Configuration + include_tasks: roles/splunk_deploy/tasks/Deploy_Conf_SHC_Init.yml + + +- name: "Deploy Configuration Bootstrap SHC" + become: yes + become_user: "{{ privileged_user }}" + 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 diff --git a/roles/splunk_deploy/tasks/Deploy_Conf_SHC_BS.yml b/roles/splunk_deploy/tasks/Deploy_Conf_SHC_BS.yml new file mode 100644 index 0000000..ae003ca --- /dev/null +++ b/roles/splunk_deploy/tasks/Deploy_Conf_SHC_BS.yml @@ -0,0 +1,5 @@ +--- +- name: "Boot-Strap" + command: "{{ splunk_exec }} bootstrap shcluster-captain -servers_list "https://{{ group.splunk_search_head[0] }}:{{ splunk_svc_port }},https://{{ group.splunk_search_head[1] }}:{{ splunk_svc_port }}"" + become: yes + become_user: "{{ privileged_user }}" diff --git a/roles/splunk_deploy/tasks/Deploy_Conf_SHC_Init.yml b/roles/splunk_deploy/tasks/Deploy_Conf_SHC_Init.yml new file mode 100644 index 0000000..618e591 --- /dev/null +++ b/roles/splunk_deploy/tasks/Deploy_Conf_SHC_Init.yml @@ -0,0 +1,6 @@ +--- +- name: "Initialize the Members" + command: "{{ splunk_exec }} init shcluster-config -mgmt_uri https://{{ inventory_hostname }}:{{ splunk_svc_port }} -replication_port {{ splunk_shcluster_replication_port }} -secret {{ splunk_password }} -shcluster_label {{ splunk_shcluster_label }}" + become: yes + become_user: "{{ privileged_user }}" +