diff --git a/ansible_runner/interface.py b/ansible_runner/interface.py index 22f284862..6486087b4 100644 --- a/ansible_runner/interface.py +++ b/ansible_runner/interface.py @@ -903,6 +903,8 @@ def get_role_list(collection=None, playbook_dir=None, **kwargs): ''' Run an ``ansible-doc`` command to get list of installed collection roles. + .. note:: Version added: 2.2 + :param str collection: A fully qualified collection name used to filter the results. :param str playbook_dir: This parameter is used to sets the relative path to handle playbook adjacent installed roles. @@ -973,7 +975,9 @@ def get_role_list(collection=None, playbook_dir=None, **kwargs): def get_role_argspec(role, collection=None, **kwargs): ''' - Run an ``ansible-doc`` command to get a collection role argument spec. + Run an ``ansible-doc`` command to get a collection role argument specification. + + .. note:: Version added: 2.2 ''' event_callback_handler = kwargs.pop('event_handler', None) status_callback_handler = kwargs.pop('status_handler', None) diff --git a/docs/python_interface.rst b/docs/python_interface.rst index 06719e0d0..fd909885b 100644 --- a/docs/python_interface.rst +++ b/docs/python_interface.rst @@ -99,6 +99,33 @@ and it can be customized to return only the changed configuration value by setti view of the active configuration file. The exectuin will be in the foreground and return a tuple of output and error response when finished. While running the command within the container the current local working diretory will be volume mounted within the container. +``get_role_list()`` helper function +----------------------------------- + +:meth:`ansible_runner.interface.get_role_list` + +*Version added: 2.2* + +This function will execute the ``ansible-doc`` command to return the list of installed roles. +This data can be fetched from either the local environment or from within a container image +based on the parameters passed. It will run in the foreground and return a tuple of output +and error response when finished. Successful output will be in JSON format as returned from +``ansible-doc``. + +``get_role_argspec()`` helper function +-------------------------------------- + +:meth:`ansible_runner.interface.get_role_argspec` + +*Version added: 2.2* + +This function will execute the ``ansible-doc`` command to return a role argument specification. +This data can be fetched from either the local environment or from within a container image +based on the parameters passed. It will run in the foreground and return a tuple of output +and error response when finished. Successful output will be in JSON format as returned from +``ansible-doc``. + + The ``Runner`` object ---------------------