From f896cc19cb69f7b14a3027e3f9ea468af10af5c4 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Fri, 26 Jun 2020 18:22:04 +0000 Subject: [PATCH] Document how to use TRIPLEO_JOB_ANSIBLE_ARGS The TRIPLEO_JOB_ANSIBLE_ARGS environment variable is useful when using scripts/run-local-test. This updates the documentation with an example of how to use it to pass arbitrary Ansible arguments when testing a role. Change-Id: I0a3656f308ceaf1a7c36fdd30245f01893489b88 --- doc/source/contributing_roles.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/source/contributing_roles.rst b/doc/source/contributing_roles.rst index 561ca39f3..2f6cfc0cc 100644 --- a/doc/source/contributing_roles.rst +++ b/doc/source/contributing_roles.rst @@ -88,7 +88,17 @@ To use this script execute the following command. .. code-block:: console - $ scripts/run-local-test ${NEWROLENAME} + $ ./scripts/run-local-test ${NEWROLENAME} + +When using the `run-local-test` script, the TRIPLEO_JOB_ANSIBLE_ARGS +environment variable can be used to pass arbitrary Ansible arguments. +For example, the following shows how to use `--skip-tags` when testing +the `tripleo_ceph_run_ansible` role. + +.. code-block:: console + + $ export TRIPLEO_JOB_ANSIBLE_ARGS="--skip-tags run_ceph_ansible,run_uuid_ansible" + $ ./scripts/run-local-test tripleo_ceph_run_ansible Role based testing with molecule can be executed directly from within the role directory.