Skip to content

codeaffen/ansible-hiera-data

Repository files navigation

Ansible Hieradata

Version on Galaxy Codacy Badge Documentation Status

This collection provides plugins to manage your project configuration data in a hierarchical manner like puppet do.

Installation

The collection is available via Ansible Galaxy. So you can run

ansible-galaxy collection install codeaffen.hieradata

Alternatively you can build and install the collection from source.

make dist
ansible-galaxy collection install codeaffen-hieradata-<version>.tar.gz

Configuraton

vars plugin configuration

The plugin comes with useful defaults to start to use the hieradata vars plugin without any configuration.

But if you need to customize the configuration you can see in documentation you can configure the vars plugin eigther via ansible.cfg parameter in section hieradata or via environment variables.

You have to keep in mind that the paths for basedir and config are relative to your inventory or playbook directory, depending of the selected stage. Without any configuration you have to place the basedir and config as followed.

.
├── ansible.cfg
├── hieradata
├── hieradata.yml
└── hosts

If you want to use a different base then hieradata you can override it by exporting HIERADATA_BASE_DIR environment variable. This directory also has to belongs to inventory dirctory.

.
├── ansible.cfg
└── inventory
    ├── hieradata
    │   └── customer_a
    ├── hieradata.yml
    └── hosts

In this example you need to do export HIERADATA_BASE_DIR=hieradata/customer_a if you want to use hieradata/customer_a as hiera basedir.

Documentation

readthedocs.io

Current documentation can be found on readthedocs.io.

repository folder

A last option to read the docs is the docs folder in this repository.

Dependencies

The following dependencies have to be fulfiled by the Ansible controller.

  • ...

Need help?

If you’ve found any issues in this release please head over to github and open a bug so we can take a look.