From 954b2a01981c6d82b213b0da7e7a8381aed321b6 Mon Sep 17 00:00:00 2001 From: JocelynPa Date: Tue, 25 Apr 2023 15:10:56 +0200 Subject: [PATCH] . --- Deploy_Keys.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Deploy_Keys.yml b/Deploy_Keys.yml index 9fe2eb0..773fa9a 100644 --- a/Deploy_Keys.yml +++ b/Deploy_Keys.yml @@ -1,19 +1,20 @@ --- - name: "Récupération du trusted.pem" + hosts: splunk_deployement become: yes tasks: - name: "Backup_Keys_DSMC" include_tasks: "roles/splunk_deploy/tasks/Backup_Keys_DSMC.yml" - hosts: splunk_deployement + register: trusted_file - - name: "Deploy_Keys_to_others" - include_tasks: "roles/splunk_deploy/tasks/Deploy_Keys_to_others.yml" - 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 + +- 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 }}"