diff --git a/plugins/modules/capabilities.py b/plugins/modules/capabilities.py index b3143df0a4..91f2c5527b 100644 --- a/plugins/modules/capabilities.py +++ b/plugins/modules/capabilities.py @@ -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