Skip to content

Commit 9afe057

Browse files
Fix authorized keys tasks failure when no authorized_keys are defined
1 parent 24b08e1 commit 9afe057

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/authorized_keys.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{%- set user_authorized_key_pairs = [] -%}
66
{%- for user, user_info in system.users.items() -%}
77
{%- set user_authorized_key_list = [] -%}
8-
{%- for authorized_key_list in (user_info.authorized_keys|default([], true)).values() -%}
8+
{%- for authorized_key_list in (user_info.authorized_keys|default({}, true)).values() -%}
99
{%- if authorized_key_list is string -%}
1010
{%- set _ = user_authorized_key_list.append(authorized_key_list) -%}
1111
{%- else -%}

0 commit comments

Comments
 (0)