mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
bring comments and docs up-to-date for invoking hacking/test-module (#20940)
inside test-module, rundebug also needs to know interpreters
This commit is contained in:
@@ -29,7 +29,7 @@ a module outside of the ansible program, locally, on the current machine.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
$ ./hacking/test-module -m lib/ansible/modules/commands/shell -a "echo hi"
|
$ ./hacking/test-module -m lib/ansible/modules/commands/command.py -a "echo hi"
|
||||||
|
|
||||||
This is a good way to insert a breakpoint into a module, for instance.
|
This is a good way to insert a breakpoint into a module, for instance.
|
||||||
|
|
||||||
@@ -60,5 +60,3 @@ Authors
|
|||||||
-------
|
-------
|
||||||
'authors' is a simple script that generates a list of everyone who has
|
'authors' is a simple script that generates a list of everyone who has
|
||||||
contributed code to the ansible repository.
|
contributed code to the ansible repository.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,10 @@
|
|||||||
# modules
|
# modules
|
||||||
#
|
#
|
||||||
# example:
|
# example:
|
||||||
# test-module -m ../library/commands/command -a "/bin/sleep 3"
|
# ./hacking/test-module -m lib/ansible/modules/commands/command.py -a "/bin/sleep 3"
|
||||||
# test-module -m ../library/system/service -a "name=httpd ensure=restarted"
|
# ./hacking/test-module -m lib/ansible/modules/commands/command.py -a "/bin/sleep 3" --debugger /usr/bin/pdb
|
||||||
# test-module -m ../library/system/service -a "name=httpd ensure=restarted" --debugger /usr/bin/pdb
|
# ./hacking/test-module -m lib/ansible/modules/files/lineinfile.py -a "dest=/etc/exports line='/srv/home hostname1(rw,sync)'" --check
|
||||||
# test-module -m ../library/file/lineinfile -a "dest=/etc/exports line='/srv/home hostname1(rw,sync)'" --check
|
# ./hacking/test-module -m lib/ansible/modules/commands/command.py -a "echo hello" -n -o "test_hello"
|
||||||
# test-module -m ../library/commands/command -a "echo hello" -n -o "test_hello"
|
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user