diff --git a/shared/templates/sysctl/ansible.template b/shared/templates/sysctl/ansible.template index 435ec7fd229a..bdcc6be51d09 100644 --- a/shared/templates/sysctl/ansible.template +++ b/shared/templates/sysctl/ansible.template @@ -32,7 +32,7 @@ {{%- if sysctl_remediate_drop_in_file != "true" %}} {{#- sysctl module manages only last entry #}} before: >- - .*\n{{{ setsysctlvar_rx | trim('^') }}} + .*\n{{{ setsysctlvar_rx.lstrip('^') }}} {{%- endif %}} {{%- if SYSCTLVAL is none or SYSCTLVAL is not string %}}