Skip to content

conditional statements should not include jinja2 templating #1657

@strarsis

Description

@strarsis

Version

v1.30.0

What did you expect to happen?

No ansible deprecation warnings.

What actually happens?

TASK [users : Fail if root login will be disabled but admin_user will not be a sudoer] ***
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {% for user in users if user.name ==
admin_user %}{{ 'sudo' in user.groups }}{% else %}{{ false }}{% endfor %}
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {% for user in vault_users |
default([]) if user.name == admin_user %}{{ user.password is defined }}{% else
%}{{ false }}{% endfor %}
ok: [web-3.web-design-hosting.eu] => {
    "changed": false,
    "msg": "All assertions passed"
}

Steps to reproduce

Provision the Trellis web server.

System info

No response

Log output

TASK [users : Fail if root login will be disabled but admin_user will not be a sudoer] ***
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {% for user in users if user.name ==
admin_user %}{{ 'sudo' in user.groups }}{% else %}{{ false }}{% endfor %}
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {% for user in vault_users |
default([]) if user.name == admin_user %}{{ user.password is defined }}{% else
%}{{ false }}{% endfor %}
ok: [web-3.web-design-hosting.eu] => {
    "changed": false,
    "msg": "All assertions passed"
}

Please confirm this isn't a support request.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions