mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-01 19:54:24 -07:00
Merge 6193caad66
into 84b5d38c51
This commit is contained in:
commit
1cf2fabaa3
2 changed files with 4 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- capabilities - using invalid path (symlink/directory/...) returned unrelated and incoherent error messages (https://github.com/ansible-collections/community.general/issues/5649, https://github.com/ansible-collections/community.general/pull/10455).
|
|
@ -123,6 +123,8 @@ class CapabilitiesModule(object):
|
|||
if ' =' in stdout:
|
||||
# process output of an older version of libcap
|
||||
caps = stdout.split(' =')[1].strip().split()
|
||||
elif stdout.strip().endswith(")"): # '/foo (Error Message)'
|
||||
self.module.fail_json(msg="Unable to get capabilities of %s" % path, stdout=stdout.strip(), stderr=stderr)
|
||||
else:
|
||||
# otherwise, we have a newer version here
|
||||
# see original commit message of cap/v0.2.40-18-g177cd41 in libcap.git
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue