From b72d005b960967e198019b4c7b76cc42cd3602b6 Mon Sep 17 00:00:00 2001 From: David Lopez Date: Thu, 27 Jul 2023 09:05:59 +0000 Subject: [PATCH] Update create_user_ssh/check_authorizzed_key.yml --- create_user_ssh/check_authorizzed_key.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_user_ssh/check_authorizzed_key.yml b/create_user_ssh/check_authorizzed_key.yml index 7742fdb..f950608 100644 --- a/create_user_ssh/check_authorizzed_key.yml +++ b/create_user_ssh/check_authorizzed_key.yml @@ -16,11 +16,11 @@ - name: Display result debug: - msg: "Authorized key exists: {{ authorized_key_exists }}" + msg: "Authorized key exists: {{ authorized_key_exists | default(false) }}" - name: Add authorized key authorized_key: user: root # Replace with the remote user's name state: present key: "{{ key_to_add }}" - when: not authorized_key_exists \ No newline at end of file + when: authorized_key_exists | default(false) | not \ No newline at end of file