From 523ba0820bd07f9039ee184c63761138942c7b67 Mon Sep 17 00:00:00 2001 From: Robert Osowiecki Date: Thu, 30 Apr 2015 17:50:07 +0200 Subject: [PATCH] Using get_bin_path to find rmmod and modprobe --- lib/ansible/modules/extras/system/modprobe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/system/modprobe.py b/lib/ansible/modules/extras/system/modprobe.py index 50c8f72fb2a..af845ae8cf5 100644 --- a/lib/ansible/modules/extras/system/modprobe.py +++ b/lib/ansible/modules/extras/system/modprobe.py @@ -97,13 +97,13 @@ def main(): # Add/remove module as needed if args['state'] == 'present': if not present: - rc, _, err = module.run_command(['modprobe', args['name'], args['params']]) + rc, _, err = module.run_command([module.get_bin_path('modprobe', True), args['name'], args['params']]) if rc != 0: module.fail_json(msg=err, **args) args['changed'] = True elif args['state'] == 'absent': if present: - rc, _, err = module.run_command(['rmmod', args['name']]) + rc, _, err = module.run_command([module.get_bin_path('rmmod', True), args['name']]) if rc != 0: module.fail_json(msg=err, **args) args['changed'] = True