From a1b88a98454e4c095c388e05e5ff1f6d05adf4ec Mon Sep 17 00:00:00 2001 From: Anthony Martinet Date: Wed, 24 Apr 2019 17:23:04 +0200 Subject: [PATCH] fix(macros) --- sudoers/templates/sudoers.jinja | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sudoers/templates/sudoers.jinja b/sudoers/templates/sudoers.jinja index 455b4d8..2c37f93 100644 --- a/sudoers/templates/sudoers.jinja +++ b/sudoers/templates/sudoers.jinja @@ -1,7 +1,7 @@ -{%- if config.command is string -%} -{{ for_user }} {{ config.privileges }}: {{ config.command }} -{%- else -%} +{%- if config.command is iterable and config.command is not string -%} {% for command in config.command -%} {{ for_user }} {{ config.privileges }}: {{ command }} {% endfor %} +{%- else -%} +{{ for_user }} {{ config.privileges }}: {{ config.command }} {%- endif -%}