summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDavid Stygstra <david.stygstra@gmail.com>2016-09-14 08:32:08 -0400
committerRené Moser <mail@renemoser.net>2016-09-14 14:32:08 +0200
commit333133144e2281f6735278e334cd636f6672f462 (patch)
tree8ddf58c907279e3506a803932e7ee8e0ca00a439 /system
parentd69a6f20daadf802e987697259ce40b41684f4bc (diff)
downloadansible-modules-extras-333133144e2281f6735278e334cd636f6672f462.tar.gz
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.
Diffstat (limited to 'system')
-rw-r--r--system/modprobe.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/modprobe.py b/system/modprobe.py
index 94c1a704..1bb1d3f7 100644
--- a/system/modprobe.py
+++ b/system/modprobe.py
@@ -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