From 431a979bd6e563a732627eae72aac7a7aa50d149 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 4 Jan 2024 15:53:55 -0700 Subject: [PATCH] ci: support ansible-lint and ansible-test 2.16 Fix yamllint issue with markdownlint config Use FQCN for community.general modules Signed-off-by: Rich Megginson --- .ansible-lint | 4 ++-- .markdownlint.yaml | 1 + library/local_semodule.py | 1 + tasks/main.yml | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index a308df3..060c0c7 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -21,7 +21,7 @@ exclude_paths: - .markdownlint.yaml - examples/roles/ mock_modules: - - sefcontext - - selogin + - community.general.sefcontext + - community.general.selogin mock_roles: - linux-system-roles.selinux diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 4f8a979..6bf4ccd 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,4 @@ +--- # Default state for all rules default: true diff --git a/library/local_semodule.py b/library/local_semodule.py index 8d36115..5f2c719 100644 --- a/library/local_semodule.py +++ b/library/local_semodule.py @@ -42,6 +42,7 @@ description: - Use other than current SELinux module store, e.g. mls, minimum, refpolicy ... type: str + default: "" notes: - The changes are persistent across reboots. - Not tested on any debian based system. diff --git a/tasks/main.yml b/tasks/main.yml index 183300b..cb276bf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -76,7 +76,7 @@ loop_var: __selinux_item - name: Set SELinux file contexts - sefcontext: + community.general.sefcontext: target: "{{ __selinux_item.target }}" setype: "{{ __selinux_item.setype }}" ftype: "{{ __selinux_item.ftype | default('a') }}" @@ -101,7 +101,7 @@ loop_var: __selinux_item - name: Set linux user to SELinux user mapping - selogin: + community.general.selogin: login: "{{ __selinux_item.login }}" seuser: "{{ __selinux_item.seuser }}" serange: "{{ __selinux_item.serange | default('s0') }}"