Denny, Have you tried using the hiera command line utility to see what it returns for that key? `hiera mysql::server::backup::backupuser ::environment=production ::role=mysql --trace` should provide some clues as to how hiera is behaving and if it can find the right files. If that doesn't find anything, try `environment` and/or `role` (without the ::) as hiera does not normalize that, and sometimes it doesn't behave the way you would expect. You can also try looking up a key that is present in `common.yaml`, just to make sure you have the syntax right.
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 > > > All other files are copied from the above example, except: > hiera/puppet_role/ -> hieradata/role/ > > The problem is (puppet agent -t on the example host): > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Must pass backupuser to Class[Mysql::Server::Backup] at > /opt/puppet/environments/test/modules/profile/manifests/mysql/server.pp:12 > on node mon.example.com > Warning: Not using cache on failed catalog > Error: Could not retrieve catalog; skipping run > > What is wrong, so that > /opt/puppet/environments/test/hieradata/role/mysql.yaml isn't working on > the Puppet master. > > - ./manifests/site.pp > > hiera_include('classes', '') > node default { > $role = hiera('role') > include $role > } > > - manifests/mon.example.com.pp > > node 'mon.example.com' { > include role::mysql_server > } > > > - ...test/hieradata/node/mon.example.com.yaml > > # Mon > --- > classes: apt > apt::mirror: http://debianmirror.example.bla/pub/linux/debian/debian/ > apt::source: true > > --- > mysql::server::override_options : > 'client': > [...] > > > > Puppet Version is 3.8.7-1puppetlabs1 on Debian 7.11 > > > Any suggestions? > > > cu denny > -- 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/cba3bfe2-c136-48b1-8a03-80c37d00d27f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.