You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.0 KiB
62 lines
2.0 KiB
# - name: Copie de la configuration du deploiment server
|
|
# become: yes
|
|
# become_user: "{{ privileged_user }}"
|
|
# tasks:
|
|
# - name: Suppression du repertoire non fonctionnel 1
|
|
# hosts: all
|
|
# file:
|
|
# path: /opt/splunk/etc/apps/01-Conf_deploy_client
|
|
# state: absent
|
|
# force: yes
|
|
|
|
# - name: Suppression du repertoire non fonctionnel 2
|
|
# hosts: all
|
|
# file:
|
|
# path: /opt/splunkforwarder/etc/apps/01-Conf_deploy_client
|
|
# state: absent
|
|
# force: yes
|
|
|
|
# - name: Copier le répertoire dans Splunk
|
|
# hosts: all:!splunk_deployement_TIC:!splunk_monitoring_TIC:!splunk_uf_Linux_TIC
|
|
# copy:
|
|
# src: "{{ playbook_dir }}/Apps_for_Splunk/01-Conf_deploy_client"
|
|
# dest: /opt/splunk/etc/apps/
|
|
# owner: splunk
|
|
# group: splunk
|
|
|
|
# - name: Copier le répertoire dans SplunkForwarder
|
|
# hosts: splunk_uf_Linux_TIC
|
|
# copy:
|
|
# src: "{{ playbook_dir }}/Apps_for_Splunk/01-Conf_deploy_client"
|
|
# dest: /opt/splunkforwarder/etc/apps/
|
|
# owner: splunk
|
|
# group: splunk
|
|
|
|
- name: Copie de la configuration du deploiment server
|
|
become: yes
|
|
become_user: "{{ privileged_user }}"
|
|
hosts: all:!splunk_deployement_TIC:!splunk_monitoring_TIC:!splunk_uf_Linux_TIC
|
|
tasks:
|
|
- name: Supprimer le répertoire non fonctionnel dans Splunk
|
|
file:
|
|
path: /opt/splunk/etc/apps/01-Conf_deploy_client
|
|
state: absent
|
|
force: yes
|
|
|
|
- name: Copier le répertoire 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 }} 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 |