Seems the trick is to run the template thru the template action directly:

      template:
        src: ../files/prometheus/prometheus.yml.j2
        dest: /tmp/p.yml

Then you get a proper error message:

TASK: [TEST TEST] 
*************************************************************
fatal: [10.0.196.193] => {'msg': "AnsibleUndefinedVariable: One or more 
undefined variables: 'prometheus_consul_dcs' is undefined", 'failed': True} 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0aa23cb2-7243-473b-8217-a97a9100ee45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to