From 9186f3a0b4d25b14e85c5550514bb77ac202b0eb Mon Sep 17 00:00:00 2001 From: William Graef Date: Thu, 7 Nov 2024 20:41:17 -0500 Subject: [PATCH] check if remotes exist --- olam/olam_passwordless_setup.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/olam/olam_passwordless_setup.yml b/olam/olam_passwordless_setup.yml index d44f842..d9cec83 100644 --- a/olam/olam_passwordless_setup.yml +++ b/olam/olam_passwordless_setup.yml @@ -29,7 +29,9 @@ key: "{{ lookup('file', 'buffer/{{ item }}-id_rsa.pub') }}" loop: "{{ groups['control'] | flatten(levels=1) }}" become: true - when: inventory_hostname in groups['remote'] + when: + - inventory_hostname in groups['remote'] + - "'remote' in groups" - name: Print hostvars for groups ansible.builtin.debug: