Metadata-Version: 2.1
Name: ansible-anonymizer
Version: 1.1.3
Summary: Ansible Anonymizer
Author-email: Gonéri Le Bouder <goneri@lebouder.net>
Project-URL: Homepage, https://github.com/ansible/anonymizer
Keywords: pii,anonymize
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
Provides-Extra: test
License-File: LICENSE

==========
Anonymizer
==========


.. image:: https://img.shields.io/pypi/v/ansible-anonymizer.svg
        :target: https://pypi.python.org/pypi/ansible-anonymizer
.. image:: https://github.com/ansible/anonymizer/actions/workflows/tox.yml/badge.svg
        :target: https://github.com/ansible/anonymizer/actions



Library to clean up Ansible tasks from any Personally Identifiable Information (PII)


* Free software: Apache Software License 2.0


Features
--------

The library can be used to remove the PII from a multi level structure:

.. code-block::

   $ python3
   >>> from ansible_anonymizer import anonymizer
   >>> example = [{"name": "foo bar", "email": "my-email@address.com"}]
   >>> anonymizer.anonymize_struct(example)
   ['- email: lucas27@example.com\n  name: foo bar\n']

But you can also anonymize a block of text:

.. code-block::

   >>> from ansible_anonymizer import anonymizer
   >>> some_text = """
   ... - name: a task
   ...   a_module:
   ...     secret: foobar
   ... """
   >>> anonymizer.anonymize_text_block(some_text)
   '\n- name: a task\n  a_module:\n    secret: {{ }}\n'
