diff --git a/Copy_keys.yml b/Copy_keys.yml index d9046b2..8bbe01a 100644 --- a/Copy_keys.yml +++ b/Copy_keys.yml @@ -2,16 +2,32 @@ - 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 + hosts: splunk_deployement tasks: - name: Copie de la clé du DSMC sur les instances splunk copy: - src: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" - dest: /opt/splunk/etc/auth/distServerKeys/SVLCTPLOGSUP01.mom.fr/ + src: "/opt/splunk/etc/auth/distServerKeys/trusted.pem" + dest: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" + #src: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" + #dest: /opt/splunk/etc/auth/distServerKeys/SVLCTPLOGSUP01.mom.fr/ owner: root group: root + remote_src: true + register: backup_result - - name: "Start Splunk via cli" - command: "{{ splunk_exec }} start" - become: yes - become_user: "{{ privileged_user }}" \ No newline at end of file +- name: Copie de la clé du DSMC sur les instances splunk + become: true + become_user: "{{ privileged_user }}" + hosts: all:!splunk_uf_Linux:!splunk_deployement + copy: + src: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" + dest: "/opt/splunk/etc/auth/distServerKeys/SVLCTPLOGSUP01.mom.fr/" + owner: root + group: root + remote_src: true + vars: + backup_result_var: "{{ backup_result }}" + # - name: "Start Splunk via cli" + # command: "{{ splunk_exec }} start" + # become: yes + # become_user: "{{ privileged_user }}" \ No newline at end of file