diff --git a/docs/python_interface.rst b/docs/python_interface.rst index 35a348e55..8905caddf 100644 --- a/docs/python_interface.rst +++ b/docs/python_interface.rst @@ -203,7 +203,7 @@ Usage examples .. code-block:: python # run ansible/generic commands in interactive mode within container - out, err = ansible_runner.run_command( + out, err, rc = ansible_runner.run_command( executable_cmd='ansible-playbook', cmdline_args=['gather.yaml', '-i', 'inventory', '-vvvv', '-k'], input_fd=sys.stdin, @@ -213,19 +213,21 @@ Usage examples process_isolation=True, container_image='network-ee' ) + print("rc: {}".format(rc)) print("out: {}".format(out)) print("err: {}".format(err)) .. code-block:: python # run ansible/generic commands in interactive mode locally - out, err = ansible_runner.run_command( + out, err, rc = ansible_runner.run_command( executable_cmd='ansible-playbook', cmdline_args=['gather.yaml', '-i', 'inventory', '-vvvv', '-k'], input_fd=sys.stdin, output_fd=sys.stdout, error_fd=sys.stderr, ) + print("rc: {}".format(rc)) print("out: {}".format(out)) print("err: {}".format(err))