From e4e266f725a3e6afff67428c1d44f482273ac529 Mon Sep 17 00:00:00 2001 From: Shaun Brady Date: Tue, 22 Aug 2017 10:39:26 -0400 Subject: [PATCH] Replace " for ' to expand tab characters (#109) When these strings are single quoted, we get a literaly '\t' string where a TAB character is expected. Double quoting does the expected thing. Tested with Ansible 2.1.0.0. --- tasks/cat1.yml | 2 +- tasks/cat3.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/cat1.yml b/tasks/cat1.yml index 9e66a01..0c51456 100644 --- a/tasks/cat1.yml +++ b/tasks/cat1.yml @@ -259,7 +259,7 @@ backup: yes dest: /etc/xinetd.d/tftp regexp: 'server_args\s+=\s+(/.*$)' - line: '\tserver_args\t\t= -s \1' + line: "\tserver_args\t\t= -s \\1" backrefs: yes when: "rhel6stig_tftp_required and 'tftp' in tftp_service_check.rc == 0" notify: reload xinetd diff --git a/tasks/cat3.yml b/tasks/cat3.yml index cd34aeb..67b1c7a 100644 --- a/tasks/cat3.yml +++ b/tasks/cat3.yml @@ -295,7 +295,7 @@ backup: no dest: /etc/login.defs regexp: '^#?PASS_WARN_AGE' - line: 'PASS_WARN_AGE\t7' + line: "PASS_WARN_AGE\t7" tags: - cat3 - low