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

Confused how to implement sub role / sub class with hiera_include

$
0
0
I set up roles and profiles with hiera. Nodes are classifing is done in hiera with hiera_include and a custom role fact which assigns the role If i have a host with facter set to role=mysql and subrole = slave, how do I get the role assigned to role. Custom facts /opt/puppetlabs/facter/facts.d/role.yaml role: mysql /opt/puppetlabs/facter/facts.d/subrole.yaml subrole: slave hiera.yaml :hierarchy: - "nodes/%{::trusted.certname}" - "roles/%{::role}" - common site.pp hiera_include('classes') hieradata/roles/mysql.yaml --- classes: - profile::mysql

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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