From 07b1e80101dc368255d608b75935f4994381a546 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Wed, 4 Jan 2023 23:36:10 +0100 Subject: [PATCH] updated users state --- states/users/sshkeys.sls | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/states/users/sshkeys.sls b/states/users/sshkeys.sls index b5a9f99..86811e6 100644 --- a/states/users/sshkeys.sls +++ b/states/users/sshkeys.sls @@ -1,14 +1,14 @@ --- {%- from "users/map.jinja" import users with context -%} -{%- for username,user in users.items() %} +{%- for username, user in users.items() %} {%- if user.sshkeys is defined %} -{%- for key in user.sshkeys %} -ssh-key-{{ username }}-{{ key.name }}: - ssh_auth.{{ key.state }}: +{%- for name, sshkey in user.sshkeys.items() %} +ssh-key-{{ username }}-{{ name }}: + ssh_auth.{{ sshkey.state }}: - user: {{ username }} - names: - - {{ key.value }} + - {{ sshkey.value }} - require: - user: user-{{ username }} {% endfor %}