Metadata-Version: 2.1
Name: ansible-output-parser
Version: 0.1.0
Summary: Parser for Ansible output
Home-page: https://github.com/RockProfile/Ansible-Output-Parser
Author: Peter McDonald
Author-email: admin@rockprofile.com
Project-URL: Bug Tracker, https://github.com/RockProfile/Ansible-Output-Parser/issues
Project-URL: Source, https://github.com/RockProfile/Ansible-Output-Parser
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
Provides-Extra: test
Provides-Extra: build
License-File: LICENSE

Ansible Parser
==============

The Ansible Parser is intended to parse the output that Ansible returns.

Installation
------------

Simply install using:

.. code-block:: sh

    pip install ansible-output-parser

Usage
-----

.. code-block:: python

    from ansible_parser.play import Play
    play = "" # populate with play output
    ansible = Play(play_output=play)
    failures = ansible.failures()

Alternatively the following can be executed to read from a log file:

.. code-block:: python

    from ansible_parser.logs import Logs
    log_file = "" # path to log file
    log_plays = Logs(log_file=log_file)

Reading from a log file will result in multiple plays as it may process plays with the same
name.
