From f8412a005c462c239e7d6f1ca1dd1a3908eee506 Mon Sep 17 00:00:00 2001 From: Dick Visser Date: Fri, 15 Mar 2024 12:17:49 +0100 Subject: [PATCH] Don't include jinja2 templating delimiters in conditional statements (#12) --- tasks/account_enable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/account_enable.yml b/tasks/account_enable.yml index eb6cbb4..9640c7a 100644 --- a/tasks/account_enable.yml +++ b/tasks/account_enable.yml @@ -2,7 +2,7 @@ - name: Check unsupported parameters for user {{ account.name }} assert: that: - - "{{ account.keys() | list | difference(_ansible_user_module_params) | difference(_our_params|union(['gid','system_group'])) | length < 1 }}" + - account.keys() | list | difference(_ansible_user_module_params) | difference(_our_params|union(['gid','system_group'])) | length < 1 fail_msg: "Unsupported parameters: {{ account.keys() | list | difference(_ansible_user_module_params) | difference(_our_params) | join(', ') }}." ignore_errors: true @@ -10,7 +10,7 @@ - name: Ensure no conflicting parameters for user {{ account.name }} assert: - that: "{{ account.keys() | list | intersect(['ssh_config', 'ssh_config_template']) | length < 2 }}" + that: account.keys() | list | intersect(['ssh_config', 'ssh_config_template']) | length < 2 fail_msg: "Define either 'ssh_config' or 'ssh_config_template' - not both."