Hard to guess what's going on here without seeing your playbook and template file, but my guess would be the template (.j2) file isn't in one of the places that ansible expects to find it.
If your template is in a role (best place for it) then there are some rules about where ansible will look for templates (and other files) described here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#using-roles I can't speak for 'kitchen' as I haven't used for it, but the `template` module should copy (templated) files to the destination that is specified - but if it can't find the template then it wont of course. Hope this helps, Jon On Monday, November 19, 2018 at 8:25:47 AM UTC, Ian Burrows wrote: > > Hi, I am very new to Ansible and I have a question regarding the template > module. > > I am receiving an error running a playbook where ansible cannot find or > access the j2 file. > > If I transfer the file manually into /tmp/kitchen/ where it says it is > looking, then it runs fine. I am using Test Kitchen with kitchen-ansible, > Vagrant and Inspec on Windows. Is the template file not supposed to be sent > to the host with kitchen? Maybe this is a Test Kitchen issue of not > generating the files on the target? > > Thank you for any guidance. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/290ca6d1-1f10-4364-b128-8a0d5435ff3f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
