This collection provides plugins to manage your project configuration data in a hierarchical manner like puppet do.
The collection is available via Ansible Galaxy. So you can run
ansible-galaxy collection install codeaffen.hieradataAlternatively you can build and install the collection from source.
make dist
ansible-galaxy collection install codeaffen-hieradata-<version>.tar.gzThe 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
└── hostsIf 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
└── hostsIn this example you need to do export HIERADATA_BASE_DIR=hieradata/customer_a if you want to use hieradata/customer_a as hiera basedir.
Current documentation can be found on readthedocs.io.
A last option to read the docs is the docs folder in this repository.
The following dependencies have to be fulfiled by the Ansible controller.
- ...
If you’ve found any issues in this release please head over to github and open a bug so we can take a look.