Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install NetworkManager as part of wireless_disable_interfaces remediation #10018

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
# complexity = low
# disruption = medium

- name: Check if NetworkManager is installed
ansible.builtin.package_facts:
manager: "auto"

- name: Error message when NetworkManager not installed
fail:
msg: "NetworkManager package not installed"
when: "'NetworkManager' not in ansible_facts.packages"
- name: Ensure NetworkManager is installed
ansible.builtin.package:
name: "{{ item }}"
state: present
with_items:
- NetworkManager

- name: Deactivate Wireless Network Interfaces
command: nmcli radio wifi off
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# platform = multi_platform_all

if
rpm -q NetworkManager
then
nmcli radio all off
else
echo "NetworkManager package not installed" >&2
fi
{{{ bash_package_install("NetworkManager") }}}

nmcli radio all off