On Wednesday, December 21, 2016 at 11:37:38 AM UTC-5, Denny Fuchs wrote: > > hi, > > I try to understand the example from > https://rnelson0.com/2015/02/02/deploying-mysql-with-puppet-without-disabling-selinux/comment-page-1/ > > with MySQL. > > At this moment, most parts are working, except role/mysql.yaml . It seems, > that this file isn't noticed by hiera/puppet: > > :yaml: > :datadir: "/etc/puppet/environments/%{environment}/hieradata" > > :hierarchy: > - "node/%{::fqdn}" > - "role/%{::role}" > - "profile/%{::profile}" > - "operatingsystem/%{::operatingsystem}/%{::operatingsystemmajrelease}" > - "operatingsystem/%{::operatingsystem}" > - "osfamily/%{::osfamily}" > - "datacenter/%{::datacenter}" > - "virtual/%{::is_virtual}" > - common > > Everything you're using in your hiera.yaml is OK except the role line-- "role" is not a fact (unless you have a custom fact defining it), or a top-level variable, so you'll need to define it before any hiera calls that might use it.
./manifests/site.pp > > hiera_include('classes', '') > node default { > $role = hiera('role') > include $role > } > Here, you define $role, but you're pulling it from hiera as well-- where is this variable defined? I suspect that if you add: $role = 'mysql' to your role/manifests/mysql_server.pp file, that things may improve-- but you're also declaring it in your default node definition (or trying to), and one thing puppet doesn't tolerate well is defining the same variable twice. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1200b36c-8dd0-413b-8a3a-2017fafba16f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.