diff options
author | Sam Doran <sdoran@redhat.com> | 2019-05-23 18:20:30 -0400 |
---|---|---|
committer | Alicia Cozine <879121+acozine@users.noreply.github.com> | 2019-05-23 17:20:29 -0500 |
commit | 50b1a6664988692c8fe9be19bdd6d0372a6c612f (patch) | |
tree | 9449d77c9d6b0dbed61a6545c909889a330df7e5 /docs | |
parent | 9c5b72147ed97ecdbe3aa79cf0d3010a56c5b710 (diff) | |
download | ansible-50b1a6664988692c8fe9be19bdd6d0372a6c612f.tar.gz |
Update instructions for running module directly (#56883)
The internals of AnsiballZ changed silghtly
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docsite/rst/dev_guide/debugging.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/docsite/rst/dev_guide/debugging.rst b/docs/docsite/rst/dev_guide/debugging.rst index df60970871..e176740d2e 100644 --- a/docs/docsite/rst/dev_guide/debugging.rst +++ b/docs/docsite/rst/dev_guide/debugging.rst @@ -22,11 +22,11 @@ To debug a module running on a remote target (i.e. not ``localhost``): #. Take note of the directory Ansible used to store modules on the remote host. This directory is usually under the home directory of your ``ansible_user``, in the form ``~/.ansible/tmp/ansible-tmp-...``. #. SSH into the remote target after the playbook runs. #. Navigate to the directory you noted in step 3. -#. Extract the module you want to debug from the zipped file that Ansible sent to the remote host: ``$ python my_test_module.py explode``. Ansible will expand the module into ``./debug-dir``. You can optionally run the zipped file by specifying ``python my_test_module.py``. +#. Extract the module you want to debug from the zipped file that Ansible sent to the remote host: ``$ python AnsiballZ_my_test_module.py explode``. Ansible will expand the module into ``./debug-dir``. You can optionally run the zipped file by specifying ``python AnsiballZ_my_test_module.py``. #. Navigate to the debug directory: ``$ cd debug-dir``. -#. Modify or set a breakpoint in ``ansible_module_my_test_module.py``. -#. Ensure that the unzipped module is executable: ``$ chmod 755 ansible_module_my_test_module.py``. -#. Run the unzipped module directly, passing the ``args`` file that contains the params that were originally passed: ``$ ./ansible_module_my_test_module.py args``. This approach is good for reproducing behavior as well as modifying the parameters for debugging. +#. Modify or set a breakpoint in ``__main__.py``. +#. Ensure that the unzipped module is executable: ``$ chmod 755 __main__.py``. +#. Run the unzipped module directly, passing the ``args`` file that contains the params that were originally passed: ``$ ./__main__.py args``. This approach is good for reproducing behavior as well as modifying the parameters for debugging. .. _debugging_ansiblemodule_based_modules: |