summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils
diff options
context:
space:
mode:
authorJan Christian Grünhage <jan.christian@gruenhage.xyz>2022-07-01 00:24:42 +0200
committerGitHub <noreply@github.com>2022-06-30 18:24:42 -0400
commitb56d73796e85f162d50b4fcd5930035183032d4a (patch)
treeab807fe07f2509bbd4cdf0ae23254dd4abbfc0b6 /lib/ansible/module_utils
parent1a417e52d6efc0e6233efd56d86da528e3c4dd74 (diff)
downloadansible-b56d73796e85f162d50b4fcd5930035183032d4a.tar.gz
Clarify that sbin directories are always looked at in get_bin_path (#78171)
Diffstat (limited to 'lib/ansible/module_utils')
-rw-r--r--lib/ansible/module_utils/common/process.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/common/process.py b/lib/ansible/module_utils/common/process.py
index f128cd9800..97761a4707 100644
--- a/lib/ansible/module_utils/common/process.py
+++ b/lib/ansible/module_utils/common/process.py
@@ -16,6 +16,8 @@ def get_bin_path(arg, opt_dirs=None, required=None):
- required: [Deprecated] Prior to 2.10, if executable is not found and required is true it raises an Exception.
In 2.10 and later, an Exception is always raised. This parameter will be removed in 2.14.
- opt_dirs: optional list of directories to search in addition to PATH
+ In addition to PATH and opt_dirs, this function also looks through /sbin, /usr/sbin and /usr/local/sbin. A lot of
+ modules, especially for gathering facts, depend on this behaviour.
If found return full path, otherwise raise ValueError.
'''
opt_dirs = [] if opt_dirs is None else opt_dirs