-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support with-tlog authselect feature
authselect removes with-files-domain feature in F40+/RHEL10+, it is replace with the 'with-tlog' feature.
- Loading branch information
1 parent
5cfe6a0
commit 9499118
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: Check with-tlog feature exists | ||
command: authselect list-features sssd | ||
register: __tlog_authselect_features | ||
changed_when: false | ||
|
||
- name: Check if with-tlog authselect feature is currently enabled | ||
command: authselect current | ||
register: __tlog_authselect_current | ||
changed_when: false | ||
failed_when: __tlog_authselect_current.rc not in [0, 2] | ||
|
||
- name: Read nsswitch.conf | ||
slurp: | ||
src: /etc/nsswitch.conf | ||
register: __nsswitch_slurp | ||
|
||
- name: Decode nsswitch content | ||
set_fact: | ||
__nsswitch_contents: "{{ __nsswitch_slurp['content'] | b64decode }}" | ||
|
||
- name: Check if with tlog authselect feature enabled and nsswitch set correctly | ||
assert: | ||
that: | ||
- __nsswitch_contents | regex_search('^passwd:\\s+sss', multiline=True) | ||
- '"with-tlog" in __tlog_authselect_current.stdout' | ||
when: '"with-tlog" in __tlog_authselect_features.stdout' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters