From 436ad22a39c72ab28ec91d84c5a25f5d5b8d7485 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 allowed 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 bdcc6be51d09..f7f2b4f1f83b 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.