From a12696d598aa9977ea2d78f044561798f0693126 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 12 May 2016 18:20:54 -0700 Subject: [PATCH] the ansible version constant is now in a different place --- files/blockinfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/blockinfile.py b/files/blockinfile.py index 0fc0fc73cb4..37d89ca2c88 100644 --- a/files/blockinfile.py +++ b/files/blockinfile.py @@ -244,7 +244,7 @@ def main(): marker1 = re.sub(r'{mark}', 'END', marker) if present and block: # Escape seqeuences like '\n' need to be handled in Ansible 1.x - if module.constants['ANSIBLE_VERSION'].startswith('1.'): + if module.ansible_version.startswith('1.'): block = re.sub('', block, '') blocklines = [marker0] + block.splitlines() + [marker1] else: