1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use modprobe -r instead of rmmod in modprobe module (#2669)

If any modules that the module being removed depends on are unused, they
will also be removed. Fixes #2140.
This commit is contained in:
David Stygstra 2016-09-14 08:32:08 -04:00 committed by Matt Clay
parent 3dd0752746
commit 3539238ec7

View file

@ -114,7 +114,7 @@ def main():
args['changed'] = True
elif args['state'] == 'absent':
if present:
rc, _, err = module.run_command([module.get_bin_path('rmmod', True), args['name']])
rc, _, err = module.run_command([module.get_bin_path('modprobe', True), '-r', args['name']])
if rc != 0:
module.fail_json(msg=err, **args)
args['changed'] = True