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.
34 lines
992 B
34 lines
992 B
- hosts: splunk_uf_Linux
|
|
tasks:
|
|
- name: Copie sources
|
|
become: yes
|
|
become_user: root
|
|
shell: scp admin@10.10.40.21:/tmp/splunkforwarder-9.1.1-64e843ea36b1-Linux-x86_64.tgz /tmp/
|
|
|
|
- name: Mise à jour de Splunk
|
|
hosts: splunk_uf_Linux
|
|
become: yes
|
|
become_user: "{{ privileged_user }}"
|
|
vars:
|
|
splunk_version_uf: "9.1.1-64e843ea36b1-Linux-x86_64"
|
|
|
|
tasks:
|
|
|
|
- name: Arrêter le service Splunk
|
|
systemd:
|
|
name: SplunkForwarder.service
|
|
state: stopped
|
|
|
|
- name: Extraire le fichier d'installation de Splunk
|
|
unarchive:
|
|
src: "/tmp/splunkforwarder-{{ splunk_version_uf }}.tgz"
|
|
dest: "/opt"
|
|
remote_src: yes
|
|
|
|
- name: Attribution des droits
|
|
shell: "chown -R splunk:splunk /opt/splunkforwarder/*"
|
|
|
|
- name: Mettre à jour le Splunk Universal Forwarder
|
|
shell: "/opt/splunkforwarder/bin/splunk stop; /opt/splunkforwarder/bin/splunk start --accept-license --answer-yes --no-prompt"
|
|
become: yes
|