From 888c5f11410e685c7e9ab72e48865b7f8a171eb8 Mon Sep 17 00:00:00 2001 From: Michael Nunes Date: Mon, 22 May 2023 14:35:12 -0300 Subject: [PATCH] fix(config_ini): added quotes to regex tabs pattern With Salt-Master 3005.1 and Salt-Minion on 3006.1, both on Debian 11, the unquoted tab was being parsed as part of the yaml structure and throwing the following error: local: Data failed to compile: ---------- Rendering SLS 'base:openssh.config_ini' failed: Illegal tab character; line 8 --- [...] include: - openssh sshd_config-with-ini: file.replace: - name: /etc/ssh/sshd_config - pattern: ^(\w+) +(\w) <====================== - repl: '\1 \2' - show_changes: True - require_in: - ini: sshd_config-with-ini [...] --- --- openssh/config_ini.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssh/config_ini.sls b/openssh/config_ini.sls index 25a2b6f..27b4d52 100644 --- a/openssh/config_ini.sls +++ b/openssh/config_ini.sls @@ -13,7 +13,7 @@ sshd_config-with-ini: {%- if salt['file.contains_regex'](openssh.sshd_config, regex_search_for_tabs) %} file.replace: - name: {{ openssh.sshd_config }} - - pattern: {{ regex_search_for_tabs }} + - pattern: '{{ regex_search_for_tabs }}' - repl: '\1 \2' - show_changes: True - require_in: