From 2903c7b5684680a0a851cdd07fa1a08b36d52ce6 Mon Sep 17 00:00:00 2001 From: Jim Kleckner Date: Thu, 26 Dec 2013 16:32:32 -0800 Subject: [PATCH] Fix documentation example for the fail module The example for the fail module doesn't work: http://www.ansibleworks.com/docs/modules.html#fail The current text shows: - fail: msg="The system may not be provisioned according to the CMDB status." when: "{{ cmdb_status }} != 'to-be-staged'" The "when" documentation indicates that the argument is already a Jinja2 expression: http://www.ansibleworks.com/docs/playbooks_conditionals.html#the-when-statement Thus, the following is when: cmdb_status != "to-be-staged" is preferred even though the following could work but generates a deprecation warning: when: {{cmdb_status != "to-be-staged"}} --- utilities/fail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/fail b/utilities/fail index 7023f357cac..23f5b83668c 100644 --- a/utilities/fail +++ b/utilities/fail @@ -40,5 +40,5 @@ author: Dag Wieers EXAMPLES = ''' # Example playbook using fail and when together - fail: msg="The system may not be provisioned according to the CMDB status." - when: "{{ cmdb_status }} != 'to-be-staged'" + when: cmdb_status != "to-be-staged" '''