Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Sharing hiera across multiple environments

$
0
0
Hello, How do you share common hiera values across multiple environments (e.g. staging, production, testing) using puppet with r10k? And how do you deploy those defaults automatically? I've got multiple projects defined in r10k, and each project have at least 3 environments - staging, production, testing. I would like to move common values (a lot of them) to separate file so I don't need to duplicate them. At this moment I plan to create custom fact that returns same value for each environments, e.g. projname, add to **hiera.yaml**: - "%{::environment}/hieradata/%{::fqdn}" - "%{::environment}/hieradata/%{::hostname}" - "%{::environment}/hieradata/role-%{::cluster_role}" - "%{::environment}/hieradata/virtual-%{::is_virtual}" - "%{::environment}/hieradata/common" - "%{::projname}/hieradata/common" And simply add projname as another branch in project git repository with hieradata. **I'm not very satisfied with this solution, could you suggest anything better?** Any help appreciated.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>