{% for i in ansible_play_hosts %} <tr> <td class="tg-o8wf">{{ i }}</td> <td class="tg-o8wf">{{ hostvars[i].ansible_os_name }}</td> <td class="tg-o8wf">{{ hostvars[i].ansible_distribution }}</td>
<td class="tg-o8wf">{{ hostvars[i].ansible_env.NUMBER_OF_PROCESSORS }}</td>
...
...TASK [xxx] *************************************task path: /etc/ansible/playbooks/xxx.yml:6fatal: [xxx -> localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"dest": "/etc/ansible/playbooks/xxx.txt", "src": "/etc/ansible/playbooks/xxx.j2"}, "module_name": "template"}, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'ansible_env'"}...ignoring{% for i in ansible_play_hosts %} <tr>{% if hostvars[i].check_finish is not defined %} <td>{{ i }}</td> <td>Host is unreachable by Ansible</td>{% else %}{% if hostvars[i].check_finish.failed is defined %} <td class="tg-o8wf">{{ i }}</td> <td class="tg-o8wf" colspan="7">{{ hostvars[i].check_finish.msg }}</td>{% else %} <td>{{ i }}</td> <td>{{ hostvars[i].ansible_env.USERDOMAIN }}</td>...
...
...
{% endif %}{% endif %}
{% endfor %}