fix error templating when using an ansible inventory script