From 5ac40b358d7d64e4169813e400c19f869b17183c Mon Sep 17 00:00:00 2001 From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Date: Fri, 19 Aug 2022 15:06:03 -0400 Subject: [PATCH] fix adhoc dev example (#78593) --- docs/docsite/rst/dev_guide/developing_modules_general.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docsite/rst/dev_guide/developing_modules_general.rst b/docs/docsite/rst/dev_guide/developing_modules_general.rst index 3f1f27fd061..abffcf191c8 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_general.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_general.rst @@ -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.