Member-only story
FATAL template error while templating string — Ansible troubleshooting
How to reproduce, troubleshoot, and fix the “FATAL template error while templating string” Ansible runtime error.
3 min readSep 21, 2021
Today we’re going to talk about Ansible troubleshooting and specifically about the “FATAL template error while templating string” error.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot
demo
The best way of talking about Ansible troubleshooting is to jump in a live demo to show you practically the FATAL template error while templating string” error and how to solve it!
- template_error_string_error.yml
---
- name: file module demo
hosts: all
vars:
myfile: "{{ ~/example.txt }}"
tasks:
- name: Creating an empty file
ansible.builtin.file:
path: "{{ myfile }}"
state: touch
output
$ ansible-playbook -i demo/inventory troubleshooting/template_error_string_error.ymlPLAY [file module demo]…