From e07b7ac3734c4727c3d4641f55143d549979aa53 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Thu, 11 May 2017 11:07:50 +0200 Subject: [PATCH] Distribute tunnel keys without delegation --- tasks/tunnel_keys.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tasks/tunnel_keys.yml b/tasks/tunnel_keys.yml index 782f826..91ff270 100644 --- a/tasks/tunnel_keys.yml +++ b/tasks/tunnel_keys.yml @@ -8,8 +8,7 @@ - name: "Distribute public key of tunnel user" authorized_key: user='{{ tunnel_user_name }}' - key="{{ pubkey.stdout }} {{ inventory_hostname }}" - path='/home/{{ tunnel_user_name }}/.ssh/fresh_auth_keys_tunnel_{{ inventory_hostname }}' - delegate_to: '{{ item }}' + key="{{ hostvars[item].pubkey.stdout }} {{ item }}" + path='/home/{{ tunnel_user_name }}/.ssh/fresh_auth_keys_tunnel_{{ item }}' with_items: '{{ groups.all }}' when: item != "localhost" and inventory_hostname != "localhost" -- GitLab