Public bug reported:

After upgrading from ansible 1.9 to ansible 2, existing playbook started
to fail:

fatal: [dev-1]: FAILED! => {"failed": true, "msg": "ERROR! the template
file domain.xml.j2 could not be found for the lookup"}

configure-vm/tasks/main.yml
playbook:
- name: Creating VM
  virt: command=define guest={{hostname}} xml="{{lookup('template', 
'domain.xml.j2')}}"
  delegate_to: '{{hypervisor}}'

There is a template in configure-vm/files/domain.xml.j2

site.yml:

- hosts: vms
  gather_facts: no
  vars:
    hypervisor: dev-hyper
  roles:
    - configure-vm


I've checked this problem by downgrading from ansible 2 to ansible 1.9 and 
playbook starts to work.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ansible 2.0.0.2-2
ProcVersionSignature: Ubuntu 4.4.0-2.16-generic 4.4.0
Uname: Linux 4.4.0-2-generic i686
ApportVersion: 2.19.4-0ubuntu2
Architecture: i386
CurrentDesktop: X-Cinnamon
Date: Thu Feb 11 17:39:00 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-19 (936 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
PackageArchitecture: all
SourcePackage: ansible
UpgradeStatus: Upgraded to xenial on 2015-10-29 (104 days ago)
modified.conffile..etc.ansible.hosts: [deleted]

** Affects: ansible (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1544628

Title:
  lookup('template', ...) fails after upgrading to ansible 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1544628/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to