diff --git a/README.md b/README.md index 924fb35..8345eb0 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ unix_users: authorized_keys: - filename: claire@claire-pc.pub - command: /usr/local/bin/upload-file.sh - environments: + envs: - key: SSH_KEY_NAME value: bob@bob-pc filename: bob@bob-pc.pub diff --git a/templates/authorized_keys.j2 b/templates/authorized_keys.j2 index 2383944..c7c1c83 100644 --- a/templates/authorized_keys.j2 +++ b/templates/authorized_keys.j2 @@ -7,9 +7,9 @@ {% if authorized_key.command is defined and authorized_key.command | length > 0 %} {% set _args = _args + [ "command=\"" + authorized_key.command + "\"" ] %} {% endif %} - {% if authorized_key.environments is defined %} + {% if authorized_key.envs is defined %} {% set ns = namespace(envs=[]) %} - {% for environment in authorized_key.environments %} + {% for environment in authorized_key.envs %} {% if environment.key is defined and environment.key | length > 0 and environment.value is defined and environment.value | length > 0 %}