mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Make modprobe module check for builtins as well (#37150)
Without this modprobe always reports changed when modprobe-ing a builtin module. With this, if a kernel module is a builtin, the modprobe module will: - succeed (without incorrectly reporting changed) if ``state`` is ``present``; - fail if ``state`` is ``absent`` The failure will have whatever error message modprobe returns when attempting to remove a builtin module. For example: ``modprobe: ERROR: Module nfs is builtin.``
This commit is contained in:
parent
76450fd1c2
commit
069e0b8d57
3 changed files with 25 additions and 7 deletions
|
@ -131,6 +131,13 @@ Noteworthy module changes
|
|||
* The ``na_ontap_cluster_peer`` module has replaced ``source_intercluster_lif`` and ``dest_intercluster_lif`` string options with
|
||||
``source_intercluster_lifs`` and ``dest_intercluster_lifs`` list options
|
||||
|
||||
* The ``modprobe`` module now detects kernel builtins. Previously, attempting to remove (with ``state: absent``)
|
||||
a builtin kernel module succeeded without any error message because ``modprobe`` did not detect the module as
|
||||
``present``. Now, ``modprobe`` will fail if a kernel module is builtin and ``state: absent`` (with an error message
|
||||
from the modprobe binary like ``modprobe: ERROR: Module nfs is builtin.``), and it will succeed without reporting
|
||||
changed if ``state: present``. Any playbooks that are using ``changed_when: no`` to mask this quirk can safely
|
||||
remove that workaround. To get the previous behavior when applying ``state: absent`` to a builtin kernel module,
|
||||
use ``failed_when: false`` or ``ignore_errors: true`` in your playbook.
|
||||
|
||||
Plugins
|
||||
=======
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue