Skip to content

Commit

Permalink
Don't include jinja2 templating delimiters in conditional statements (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dnmvisser authored Mar 15, 2024
1 parent d00a60f commit f8412a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/account_enable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
- 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


- 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."


Expand Down

0 comments on commit f8412a0

Please sign in to comment.