diff --git a/shared/templates/sysctl/ansible.template b/shared/templates/sysctl/ansible.template index 384f7bc7c8d8..cf9348942b20 100644 --- a/shared/templates/sysctl/ansible.template +++ b/shared/templates/sysctl/ansible.template @@ -5,12 +5,7 @@ # disruption = medium {{#- sysctl quirks -#}} -{{%- set setsysctlvar_rx -%}} -^[ \t]*-?[ \t]*{{{ - SYSCTLVAR | escape_regex_sq | - replace('[.]', '[./]') | replace('[/]', '[./]') - }}}[ \t]*= -{{%- endset %}} +{{%- set setsysctlvar_rx = '^[ \t]*-?[ \t]*' ~ SYSCTLVAR | escape_regex_sq | replace('[.]', '[./]') | replace('[/]', '[./]') ~ '[ \t]*=' %}} - name: List /etc/sysctl.d/*.conf files ansible.builtin.find: paths: {{{ ansible_sysctl_set_config_directories() }}}