Jinja2 Templating

Hi Team,
Please find the below snapshot and help me to understand where i failed. Why does *Verify got failed

This is for the Question 1 under labs in Jinja2 templating

What is the content of agent.conf.j2?
My agent.conf.j2 is

hostname, ipaddress, monitor_port, type, protocol
{% for host in groups[‘lamp_app’] %}
{{ host }}, {{ hostvars[host][‘ansible_host’] }}, {{ hostvars[host][‘monitor_port’] }}, {{ hostvars[host][‘protocol’] }}
{% endfor %}

Hi @Inderpreet, @KodeKloud, @player001

I too not get the result. Please find the details below:

image

1 Like

It’s working fine. Try now. @selan

Hi @player001

I tired now and got same error message



Please help on this

Okay, let me rerun. strange
It’s a jinja2 template task right?


I just followed your code to inspect error but it’s running without error and verified as well.
Is it from different lecture labs?

Thanks @player001 It is working fine