Execution
Date 23 May 2025 11:10:15 +0100
Duration 00:00:01.23
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
1 Hosts
3 Tasks
3 Results
1 Plays
1 Files
0 Records

Task result details

  • Status
    FAILED
  • Duration
    00:00:00.06
  • Play
    Generate Ansible inventory from fetched ini files
  • Task
    Extract hostnames from filenames and build inventory groups
  • Host
    localhost

Field Value
msg
template error while templating string: Encountered unknown tag 'do'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.. String: {% set data = {} %}
{% for item in ini_files.files %}
  {% set filename = item.path | basename %}
  {% set hostname = filename | regex_replace('-panel.ini$', '') %}
  {% if 'ungrouped' not in data %}{% do data.update({'ungrouped': []}) %}{% endif %}
  {% do data['ungrouped'].append(hostname) %}
{% endfor %}
{{ data }}
. Encountered unknown tag 'do'. Jinja was looking for the following tags: 'elif' or 'else' or 'endif'. The innermost block that needs to be closed is 'if'.