Skip to content

Commit 4b2cb7f

Browse files
authored
test(tmachine): verify SELinux in Fedora scenarios (#3457)
Closes #2973 Closes #2976 Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent 2263685 commit 4b2cb7f

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
---
5+
- name: Verify SELinux
6+
hosts: all
7+
gather_facts: false
8+
9+
tasks:
10+
- name: Read the current SELinux mode
11+
ansible.builtin.command:
12+
cmd: getenforce
13+
register: selinux_mode
14+
changed_when: false
15+
16+
- name: Verify enforcing mode
17+
ansible.builtin.assert:
18+
that:
19+
- selinux_mode.stdout == "Enforcing"
20+
fail_msg: SELinux is not enforcing.

tests/config.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ let
6363
use_galaxy = false;
6464
playbooks = [
6565
"ansible/playbooks/nextest.yaml"
66+
"ansible/playbooks/selinux.yaml"
6667
"ansible/playbooks/podman-rootful.yaml"
6768
];
6869
};
@@ -87,6 +88,7 @@ let
8788
use_galaxy = false;
8889
playbooks = [
8990
"ansible/playbooks/nextest.yaml"
91+
"ansible/playbooks/selinux.yaml"
9092
"ansible/playbooks/podman-rootless.yaml"
9193
];
9294
};

0 commit comments

Comments
 (0)