forked from ansible-lockdown/RHEL9-CIS
replaced command with shell
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
ac42f8a28f
commit
3b19db6812
19 changed files with 75 additions and 75 deletions
|
|
@ -3,23 +3,21 @@
|
|||
- name: "3.5 | L1 | PATCH | Ensure wireless interfaces are disabled"
|
||||
block:
|
||||
- name: "3.5 | L1 | AUDIT | Ensure wireless interfaces are disabled | Check if nmcli command is available"
|
||||
command: rpm -q NetworkManager
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
shell: rpm -q NetworkManager
|
||||
# changed_when: false
|
||||
# failed_when: false
|
||||
check_mode: no
|
||||
args:
|
||||
warn: no
|
||||
register: rhel_09_nmcli_available
|
||||
|
||||
- name: "3.5 | L1 | AUDIT | Ensure wireless interfaces are disabled | Check if wifi is enabled"
|
||||
command: nmcli radio wifi
|
||||
shell: nmcli radio wifi
|
||||
register: rhel_09_wifi_enabled
|
||||
changed_when: rhel_09_wifi_enabled.stdout != "disabled"
|
||||
failed_when: false
|
||||
when: rhel_09_nmcli_available.rc == 0
|
||||
|
||||
- name: "3.5 | L1 | PATCH | Ensure wireless interfaces are disabled | Disable wifi if enabled"
|
||||
command: nmcli radio all off
|
||||
shell: nmcli radio all off
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: rhel_09_wifi_enabled is changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue