diff --git a/testinfra/utils/ansible_runner.py b/testinfra/utils/ansible_runner.py index c65fec31..78a6df22 100644 --- a/testinfra/utils/ansible_runner.py +++ b/testinfra/utils/ansible_runner.py @@ -393,9 +393,7 @@ def run_module( "msg": "Skipped. You might want to try check=False", } if not files: - raise RuntimeError( - "Error while running {}: {}".format(" ".join(cmd), out) - ) + raise RuntimeError(f"{out}") fpath = os.path.join(d, files[0]) try: with open(fpath, "r", encoding="ascii") as f: