Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template error (file not found) when using Jinja >= 2.8 #31

Open
ondrejkolin opened this issue Aug 9, 2018 · 2 comments
Open

Template error (file not found) when using Jinja >= 2.8 #31

ondrejkolin opened this issue Aug 9, 2018 · 2 comments

Comments

@ondrejkolin
Copy link

If this is run by Jinja higher than 2.8 it fails on looking for the templates. In this bug (debops/debops#179) there is explained, that behaviour in the Python Jinja library changed in the newer version. So templates have to be changed.

Other playbooks could be affected too.

failed: [gateway] (item=etc/dhcp/dhcpd.conf) => { "changed": false, "item": "etc/dhcp/dhcpd.conf", "msg": "AnsibleError: An unhandled exception occurred while templating '{{ lookup(\"template\", \"lookup/ifupdown__kmod__dependent_load.j2\", convert_data=False) | from_yaml }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleError'>, original message: the template file lookup/ifupdown__kmod__dependent_load.j2 could not be found for the lookup" }

@drybjed
Copy link
Member

drybjed commented Aug 9, 2018

That's odd... You are running the debops.dhcpd role but configuration from debops.ifupdown role makes an error. I wonder if you reference some role default variables in your Ansible inventory, that could cause issues when that role is not present, ie. a playbook of a different role is executed.

@ondrejkolin
Copy link
Author

Anyway downgrading helped, I'll try to reproduce it once again and add more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants