Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make modprobe module check for builtins as well #37150
Without this modprobe always reports changed when modprobe-ing a builtin module.
This makes the modprobe module check
When the module is builtin, it is already loaded and running modprobe can't change anything (neither adding or removing the kernel module). So, if it's builtin, this should never report changed.
(16:16:13) alikins: cognifloyd: sounds bugfixy to me. What should happen if you 'state=absent' a builtin module?
(16:19:45) cognifloyd: rc=1
Then it's up to the user how to handle a builtin module error appropriately if they are trying to use state=absent.
Mar 7, 2018
Looks like this needs a rebase but the idea here seems sound to me. There's a whiff of kludge about having to massage the data so much but I can't think of a better way to do it.
Since this has the potential to break existing playbooks we better have a changelog ( https://github.com/ansible/ansible/tree/devel/changelogs/fragments ) and porting guide entry: https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/porting_guides/porting_guide_2.7.rst#noteworthy-module-changes In the porting guide, be sure to mention that builtins can now make the module fail and how to work around that.