diff --git a/Deploy_Keys.yml b/Deploy_Keys.yml index 138cea3..f228be6 100644 --- a/Deploy_Keys.yml +++ b/Deploy_Keys.yml @@ -1,29 +1,29 @@ --- - name: "Récupération du trusted.pem" - #hosts: all + hosts: splunk_deployement become: yes tasks: - name: "Backup_Keys_DSMC" include_tasks: "roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml" - vars: - target_hosts: splunk_deployement - register: trusted_file + # vars: + # target_hosts: + # register: trusted_file - - name: Deploy_Keys_to_others - include_tasks: roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml - vars: - trusted_file_path: "{{ trusted_file.stdout }}" - target_hosts: all:!splunk_uf_Linux:!splunk_deployement + # - name: Deploy_Keys_to_others + # include_tasks: roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml + # vars: + # trusted_file_path: "{{ trusted_file.stdout }}" + # target_hosts: all:!splunk_uf_Linux:!splunk_deployement -# - name: "Copie du trusted.pem" -# become: yes -# hosts: all:!splunk_uf_Linux:!splunk_deployement -# gather_facts: no -# tasks: -# - name: Deploy_Keys_to_others -# include_tasks: roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml -# vars: -# trusted_file_path: "{{ trusted_file.stdout }}" +- name: "Copie du trusted.pem" + become: yes + hosts: all:!splunk_uf_Linux:!splunk_deployement + gather_facts: no + tasks: + - name: Deploy_Keys_to_others + include_tasks: roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml + vars: + trusted_file_path: "{{ trusted_file.stdout }}" diff --git a/roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml b/roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml index 9272299..113375e 100644 --- a/roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml +++ b/roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml @@ -8,4 +8,5 @@ dest: "{{ playbook_dir }}/Keys_public/SVLCTPLOGSUP01.mom.fr/" owner: root group: root - remote_src: true \ No newline at end of file + remote_src: true + register: trusted_file \ No newline at end of file diff --git a/roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml b/roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml index 1b41c47..5225a61 100644 --- a/roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml +++ b/roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml @@ -9,6 +9,8 @@ owner: root group: root remote_src: true + vars: + trusted_file_path: "{{ trusted_file.stdout }}" - name: "Attribution des droits Splunk" shell: "chown -Rf splunk:splunk /opt/splunk/"