What is the exact name of the task? I need that in order to find your lab.
Level 4 Ansible,
Managing Jinja2 Templates Using Ansible
It deploys correctly, but when I validate the task, I get an error because it’s a role and not roles. To fix this, I created a link from role to roles, and the Ansible deploys correctly.
I got a similar error to you – what did you put in main.yaml? Looks like you’re not setting the ownership of index.html as the grader wants.
Looks like the template module will let you pass an owner and group argument; the grader will pass you if you include these hard-coded, e.g.,
- name: Add index.html
template:
src: ./templates/index.html.j2
dest: /var/www/html/index.html
mode: 0744
owner: banner
group: banner
I’d prefer to pass this using a variable, but am still rooting around for the correct syntax to do that.

