Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mythsunwind/yaml_data_in_modules
A data-in-modules backend for Hiera
https://github.com/mythsunwind/yaml_data_in_modules
Last synced: about 1 month ago
JSON representation
A data-in-modules backend for Hiera
- Host: GitHub
- URL: https://github.com/mythsunwind/yaml_data_in_modules
- Owner: mythsunwind
- License: apache-2.0
- Created: 2013-11-11T15:53:00.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T09:28:46.000Z (over 6 years ago)
- Last Synced: 2023-08-05T17:45:30.527Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## yaml_data_in_modules : a data in modules backend for Hiera
### Requirement
puppet >= 3.2.3
hiera >= 1.2.1### Description
This backend will check for yaml files in a directory called "data" of the current puppet module.
### How to install it
Add this module to your Puppetfile to install "data in modules" as a new backend
mod 'yaml_data_in_modules',
:git => "[email protected]:mythsunwind/yaml_data_in_modules.git"### How to use it with hiera
Add the backend to your hiera.yaml
:backends:
- yaml_data_in_modules
- yaml
:hierarchy:
- %{context}-%{datacenter}-%{platform}-%{cluster}-%{hostname}
- %{context}-%{datacenter}-%{platform}-%{cluster}
- %{context}-%{datacenter}-%{platform}
- %{context}-%{datacenter}
- %{context}
- commonThe above configuration will check hierachically in the data directory for yaml files with the specified names. If it didn't found any files with the given names (concatinated with facts and common.yaml), the above configuration will then switch to the normal yaml backend and check at the central location.
### How to add data to your module
In your module path create a directory called *data* and add yaml files into it.
modules/example_module/
+ files
+ manifests
+ templates
+ data
+ dev-eu--vm116.yaml
+ qa-na.yaml
+ common.yamlAdd a variable to your yaml files
version : "1.23.4-567"
Use the following syntax to use this variable in your moduleclass my_module {
$version = hiera("version")
}