Mirror of a valuable repository.
Go to file
Bradley A. Thornton c20ba34c7d
Fact diff (#15)
* Add fact_diff action

* Formatting

* Update docs

* Add skip_lines

* Update docs

* black

* bug fix

* Add units for fact_diff

* Initial changes to support plugin architecture

* Restructure docstring

* Integration test fix

* Wrap diff plugin with try/except

* Fix integration test

* Restructure code to allow for plugin failure test

* Examples, docs

* Fix debug statement

* Update examples

* Minor doc updates

* Minor doc updates

* Minor doc updates

* Add change log

Co-authored-by: cidrblock <brad@thethorntons.net>
2020-10-23 04:48:16 -07:00
.github/workflows Update merge_on_gate.yml (#7) 2020-10-15 12:37:54 +00:00
changelogs Fact diff (#15) 2020-10-23 04:48:16 -07:00
docs Fact diff (#15) 2020-10-23 04:48:16 -07:00
meta get_path and to_paths 2020-10-09 10:07:26 -07:00
plugins Fact diff (#15) 2020-10-23 04:48:16 -07:00
tests Fact diff (#15) 2020-10-23 04:48:16 -07:00
.gitignore Initial commit 2020-10-06 23:34:14 +05:30
CHANGELOG.rst Initial commit 2020-10-06 23:34:14 +05:30
LICENSE Initial commit 2020-10-06 23:34:14 +05:30
README.md Fact diff (#15) 2020-10-23 04:48:16 -07:00
galaxy.yml Fix sanity 2020-10-13 07:04:06 -07:00

README.md

Ansible Utilities Collection

Codecov

The Ansible ansible.utils collection includes a variety of plugins that aid in the management, manupulation and visibility of data for the Ansible playbook developer.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10,<2.11.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Included content

Filter plugins

Name Description
ansible.utils.get_path Retrieve the value in a variable using a path
ansible.utils.index_of Find the indicies of items in a list matching some criteria
ansible.utils.to_paths Flatten a complex object into a dictionary of paths and values

Lookup plugins

Name Description
ansible.utils.get_path Retrieve the value in a variable using a path
ansible.utils.index_of Find the indicies of items in a list matching some criteria
ansible.utils.to_paths Flatten a complex object into a dictionary of paths and values

Modules

Name Description
ansible.utils.fact_diff Find the difference between currently set facts
ansible.utils.update_fact Update currently set facts

Installing this collection

You can install the ansible.utils collection with the Ansible Galaxy CLI:

ansible-galaxy collection install ansible.utils

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: ansible.utils

Using this collection

The most common use case for this collection is when complex data structures are present in an Ansible playbook, inventory, or returned from modules are worked with.

NOTE: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated.

See Also:

Contributing to this collection

This collection is intended for plugins that are not platform or discipline specific. Simple plugin examples should be generic in nature, more complex examples can include real world platform module to demonstrate the utility of the plugin in a playbook.

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the ansible.utils collection repository. See Contributing to Ansible-maintained collections for complete details.

See the Ansible Community Guide for details on contributing to Ansible.

Developer notes

  • 100% code coverage is the goal, although it's not always possible. Please include unit and integration tests with all PRs. PRs should not cause a decrease in code coverage.
  • filter plugins should be 1 per file, with an included DOCUMENTATION string/or reference a lookup plugin with the same name.
  • action, filter and lookup plugins should use argspec validation, see AnsibleArgSpecValidator
  • This collection should not depend on other collections for imported code
  • Use of the latest version of black is required for formatting (black -l79)
  • The README contains a table of plugins, the collection_prep utilities make this easy to maintain

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release notes

Release notes are available here

Roadmap

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.