From 243af8f7274c4f1f79b1e3c5ad5611fb0dc3987c Mon Sep 17 00:00:00 2001 From: Kevin Bullock Date: Fri, 22 Jul 2016 19:35:46 -0500 Subject: [PATCH] Fix order of version_compare arguments in porting guide (#15809) I struggled with this for quite a while trying to figure out the right quoting before I discovered that the arguments to `version_compare` were reversed. --- docsite/rst/porting_guide_2.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docsite/rst/porting_guide_2.0.rst b/docsite/rst/porting_guide_2.0.rst index cfd4b161031..0bf5bf205e0 100644 --- a/docsite/rst/porting_guide_2.0.rst +++ b/docsite/rst/porting_guide_2.0.rst @@ -26,7 +26,7 @@ To make an escaped string that will work on all versions you have two options:: uses key=value escaping which has not changed. The other option is to check for the ansible version:: -"{{ (ansible_version|version_compare('ge', '2.0'))|ternary( 'test1_junk 1\\3' | regex_replace('(.*)_junk (.*)', '\\1 \\2') , 'test1_junk 1\\\\3' | regex_replace('(.*)_junk (.*)', '\\\\1 \\\\2') ) }}" +"{{ (ansible_version|version_compare('2.0', 'ge'))|ternary( 'test1_junk 1\\3' | regex_replace('(.*)_junk (.*)', '\\1 \\2') , 'test1_junk 1\\\\3' | regex_replace('(.*)_junk (.*)', '\\\\1 \\\\2') ) }}" * trailing newline When a string with a trailing newline was specified in the playbook via yaml dict format, the trailing newline was stripped. When