Ansible Network Automation - Issue Rendering Jinja2 Template - Invalid input

Recent community reports around Ansible network automation stem from a regression introduced in ansible-core 2.19 related to how network *_config modules handle templating of the src parameter. Historically, some network modules supported inline Jinja2 templating directly within src (for example, src: template.j2). In ansible-core 2.19, Ansible language enhancements changed some underlying behaviors used during network configuration generation. Several network collections depended on the previous behavior, which led to breakage when those assumptions changed.

   - name: Apply configuration from template
     arista.eos.eos_config:
       src: template.j2

Ansible engineering has put out a fix, if you are running ansible-core 2.19 you can just upgrade ansible.netcommon

ansible-galaxy collection install ansible.netcommon --upgrade

There is more info on this knowledge base article: Ansible Network Automation - Issue Rendering Jinja2 Template - Invalid input - Red Hat Customer Portal

4 Likes