From 276151049ae79a8effa9e4827e2ff5e9361b1345 Mon Sep 17 00:00:00 2001 From: JocelynPa Date: Mon, 27 Mar 2023 22:06:08 +0200 Subject: [PATCH] update conf --- Copy_keys.yml | 2 +- Deleted_Splunk.yml | 2 +- Deleted_SplunkForwarder.yml | 2 +- Deploy_Conf-to-uf.yml | 9 +++++++-- Deploy_Conf-to-uf_TIA.yml | 21 --------------------- Deploy_Conf.yml | 14 ++++++++++++-- Deploy_Conf_TIA.yml | 22 ---------------------- Inventories/cluster/hosts-TIC.yml | 12 ++++++------ hosts-TIA.yml | 17 ----------------- install_splunk.yml | 2 +- install_splunk_uf.yml | 2 +- 11 files changed, 30 insertions(+), 75 deletions(-) delete mode 100644 Deploy_Conf-to-uf_TIA.yml delete mode 100644 Deploy_Conf_TIA.yml delete mode 100644 hosts-TIA.yml diff --git a/Copy_keys.yml b/Copy_keys.yml index aa28ec9..620ef18 100644 --- a/Copy_keys.yml +++ b/Copy_keys.yml @@ -2,7 +2,7 @@ - name: Copie de la clé du DSMC sur les instances splunk become: yes become_user: "{{ privileged_user }}" - hosts: all:!splunk_deployement_TIC:!splunk_uf_Linux_TIC + hosts: all:!splunk_deployement_TIC:!splunk_uf_Linux tasks: - name: Copie de la clé du DSMC sur les instances splunk copy: diff --git a/Deleted_Splunk.yml b/Deleted_Splunk.yml index 062e89a..d13cb55 100644 --- a/Deleted_Splunk.yml +++ b/Deleted_Splunk.yml @@ -1,6 +1,6 @@ --- - name: Supprimer Splunk de Linux - hosts: all:!splunk_uf_Linux_TIC + hosts: all:!splunk_uf_Linux become: true become_user: root vars: diff --git a/Deleted_SplunkForwarder.yml b/Deleted_SplunkForwarder.yml index 5063df8..00b80e2 100644 --- a/Deleted_SplunkForwarder.yml +++ b/Deleted_SplunkForwarder.yml @@ -1,6 +1,6 @@ --- - name: Supprimer Splunk de Linux - hosts: all + hosts: splunk_uf_Linux become: true become_user: root vars: diff --git a/Deploy_Conf-to-uf.yml b/Deploy_Conf-to-uf.yml index 62efddf..3fb4999 100644 --- a/Deploy_Conf-to-uf.yml +++ b/Deploy_Conf-to-uf.yml @@ -1,7 +1,7 @@ - name: Copie de la configuration du deploiment server become: yes become_user: "{{ privileged_user }}" - hosts: splunk_uf_Linux_TIC + hosts: splunk_uf_Linux tasks: - name: Copier le répertoire dans SplunkForwarder copy: @@ -13,4 +13,9 @@ - name: "Start Splunk via cli" command: "{{ splunk_exec_uf }} start --accept-license --answer-yes --no-prompt" become: yes - become_user: "{{ splunk_user }}" \ No newline at end of file + 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 diff --git a/Deploy_Conf-to-uf_TIA.yml b/Deploy_Conf-to-uf_TIA.yml deleted file mode 100644 index 86bf77e..0000000 --- a/Deploy_Conf-to-uf_TIA.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: Copie de la configuration du deploiment server - become: yes - become_user: "{{ privileged_user }}" - hosts: splunk_uf_Linux_TIA - tasks: - - name: Copier le répertoire dans SplunkForwarder - copy: - src: "{{ playbook_dir }}/Apps_for_Splunk/01-Conf_deploy_client" - dest: /opt/splunkforwarder/etc/apps/ - owner: splunk - group: splunk - - - name: "Start Splunk via cli" - command: "{{ splunk_exec_uf }} enable boot-start" - become: yes - become_user: "{{ splunk_user }}" - - - name: "Start Splunk via cli" - command: "{{ splunk_exec_uf }} start --accept-license --answer-yes --no-prompt" - become: yes - become_user: "{{ splunk_user }}" \ No newline at end of file diff --git a/Deploy_Conf.yml b/Deploy_Conf.yml index bd12a47..a438c52 100644 --- a/Deploy_Conf.yml +++ b/Deploy_Conf.yml @@ -2,11 +2,21 @@ - name: Copie de la configuration du deploiment server become: yes become_user: "{{ privileged_user }}" - hosts: all:!splunk_uf_Linux_TIC + hosts: all:!splunk_uf_Linux tasks: - name: Copier le configuration DS dans Splunk copy: 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 }}" + + - name: "Start Splunk via cli" + command: "{{ splunk_exec }} enable boot-start" + become: yes + become_user: "{{ splunk_user }}" \ No newline at end of file diff --git a/Deploy_Conf_TIA.yml b/Deploy_Conf_TIA.yml deleted file mode 100644 index 2980bf2..0000000 --- a/Deploy_Conf_TIA.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Copie de la configuration du deploiment server - become: yes - become_user: "{{ privileged_user }}" - hosts: splunk_indexer_TIA,splunk_cluster_master_TIA:!splunk_uf_Linux_TIA - tasks: - - name: Copier le configuration DS dans Splunk - copy: - src: "{{ playbook_dir }}/Apps_for_Splunk/01-Conf_deploy_client" - dest: /opt/splunk/etc/apps/ - owner: splunk - group: splunk - - - name: "Start Splunk via cli" - command: "{{ splunk_exec }} enable boot-start" - become: yes - become_user: "{{ splunk_user }}" - - - name: "Start Splunk via cli" - command: "{{ splunk_exec }} start --accept-license --answer-yes --no-prompt" - become: yes - become_user: "{{ splunk_user }}" \ No newline at end of file diff --git a/Inventories/cluster/hosts-TIC.yml b/Inventories/cluster/hosts-TIC.yml index fd55965..a895960 100644 --- a/Inventories/cluster/hosts-TIC.yml +++ b/Inventories/cluster/hosts-TIC.yml @@ -1,28 +1,28 @@ --- all_splunk_instances: children: - splunk_search_head_TIC: + splunk_search_head: hosts: SVLCTPLOGPUB01.mom.fr: SVLCTPLOGPUB02.mom.fr: - splunk_indexer_TIC: + splunk_indexer: hosts: SVLCTPLOGIDX01.mom.fr: SVLCTPLOGIDX02.mom.fr: splunk_licence_master: hosts: SVLCTPLOGLMR.mom.fr: - splunk_uf_Linux_TIC: + splunk_uf_Linux: hosts: SVLCTPSUPPFI01.mom.fr: SVLCTPSUPPFI02.mom.fr: - splunk_uf_Windows_TIC: + splunk_uf_Windows: hosts: SVWCTPSUPPFI01.mom.fr: - splunk_deployement_TIC: + splunk_deployement: hosts: SVLCTPLOGSUP01.mom.fr: - splunk_monitoring_TIC: + splunk_monitoring: hosts: SVLCTPLOGSUP01.mom.fr: splunk_cluster_master: diff --git a/hosts-TIA.yml b/hosts-TIA.yml deleted file mode 100644 index dc142ee..0000000 --- a/hosts-TIA.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -all_splunk_instances: - children: - splunk_indexer_TIA: - hosts: - SVLATPLOGIDX01.mom.fr: - SVLATPLOGIDX02.mom.fr: - splunk_uf_Linux_TIA: - hosts: - SVLATPSUPPFI01.mom.fr: - SVLATPSUPPFI02.mom.fr: - splunk_uf_Windows_TIA: - hosts: - SVWATPSUPPFI01.mom.fr: - splunk_cluster_master_TIA: - hosts: - SVLATPLOGCLM01.mom.fr: \ No newline at end of file diff --git a/install_splunk.yml b/install_splunk.yml index 810913b..4d10f0c 100644 --- a/install_splunk.yml +++ b/install_splunk.yml @@ -28,7 +28,7 @@ become: yes become_user: root -- hosts: splunk_indexer_TIC +- hosts: splunk_indexer become: true become_user: root tasks: diff --git a/install_splunk_uf.yml b/install_splunk_uf.yml index c20e8b1..bf97f91 100755 --- a/install_splunk_uf.yml +++ b/install_splunk_uf.yml @@ -1,5 +1,5 @@ --- -- hosts: splunk_uf_Linux_TIC +- hosts: splunk_uf_Linux tasks: - name: Gathering Facts include_tasks: roles/splunk_common_uf/tasks/pre_install_subtasks/get_facts.yml