From 63fe82c999b3090aff84be2249dc103675b3a3cb Mon Sep 17 00:00:00 2001 From: Markus Linnala Date: Fri, 12 May 2023 07:26:16 +0300 Subject: [PATCH] fix: sysctl/ansible: FQDN ansible.posix.sysctl not in 2.9 Newer ansible (mine 2.14) has sysctl at ansible.posix.sysctl. But build system does not accept it: Found module which is not allowed: {'tags', 'name', 'when', 'ansible.posix.sysctl'} and ERROR! couldn't resolve module/action 'ansible.posix.sysctl'. This often indicates a misspelling, missing collection, or incorrect module path. --- shared/templates/sysctl/ansible.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/templates/sysctl/ansible.template b/shared/templates/sysctl/ansible.template index bdcc6be51d0..f7f2b4f1f83 100644 --- a/shared/templates/sysctl/ansible.template +++ b/shared/templates/sysctl/ansible.template @@ -39,7 +39,7 @@ - (xccdf-var sysctl_{{{ SYSCTLID }}}_value) - name: Ensure sysctl {{{ SYSCTLVAR }}} is set - ansible.posix.sysctl: + sysctl: name: "{{{ SYSCTLVAR }}}" # Ansible sysctl module doesn't allow empty string. A space string is # allowed and has the same semantics as sysctl will ignore spaces. @@ -49,7 +49,7 @@ {{%- else %}} - name: Ensure sysctl {{{ SYSCTLVAR }}} is set to {{{ SYSCTLVAL }}} - ansible.posix.sysctl: + sysctl: name: "{{{ SYSCTLVAR }}}" # Ansible sysctl module doesn't allow empty string. A space string is # allowed and has the same semantics as sysctl will ignore spaces.