/ansible_plugins

Useful ansible plugins

Primary LanguagePythonApache License 2.0Apache-2.0

Logo

Build Status

Ansible Plugins

These are some useful ansible plugins.

Getting Started

These instructions will guide you how to use these plugins in an ansible playbook or role.

Prerequisities

Python 2.7 installed (at least). An ansible role or playbook environment.

Plugins are created as ansible dev guide says.

Installing

Just create a folder named filter_plugins as says in the ansible best practices and add the file you want.

There are other ways to use them. Check it out the ansible docs.

Usage

Check out the test folder to see an example of each plugin.

The provided plugins are:

An example of in_list plugin filter:

set_fact:
  list:
    - name: 'one'
      value: 1
    - name: 'two'
      value: 2
    - name: 'three'
      value: 3

set_fact:
  filter_list: ['one', 'two']

set_fact:
  filtered_in_list: "{{ list | in_list('name', filter_list) }}"

Testing

./test/run.sh

Built With

Ansible Python

Versioning

No versions are released in this repository. Master branch has the latest version.

Additionaly you can see what change in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 Licence

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.