fix adhoc dev example (#78593)

pull/78606/head
Sloane Hertel 2 years ago committed by GitHub
parent beb70daf14
commit 5ac40b358d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,13 +80,13 @@ The simplest way is to use ``ansible`` adhoc command:
.. code:: shell
ansible -m library/my_test.py -a 'name=hello new=true' remotehost
ANSIBLE_LIBRARY=./library ansible -m my_test -a 'name=hello new=true' remotehost
If your module does not need to target a remote host, you can quickly and easily exercise your code locally like this:
.. code:: shell
ansible -m library/my_test.py -a 'name=hello new=true' localhost
ANSIBLE_LIBRARY=./library ansible -m my_test -a 'name=hello new=true' localhost
- If for any reason (pdb, using print(), faster iteration, etc) you want to avoid going through Ansible,
another way is to create an arguments file, a basic JSON config file that passes parameters to your module so that you can run it.

Loading…
Cancel
Save