I would isolate the Hiera lookup first, run it by hand on your Puppet Master:
hiera --debug -c /etc/puppetlabs/code/hiera.yaml -y $(puppet config print yamldir)/facts/vm.yaml ossec::client::ossec_server_ip ::environment=development The above assumes the certname of your node is actually "vm", it's probably not, so change the path to your node's YAML Facts cache. -- Luke Bigum ----- Original Message ----- From: "Todd Courtnage" <[email protected]> To: "Puppet Users" <[email protected]> Sent: Tuesday, 8 September, 2015 10:49:22 PM Subject: [Puppet Users] Using hiera to configure the jgazeley/ossec module I'm in the process of refactoring our puppet to make use of r10k, hiera and roles/profiles, as seems to be the suggested methodology these days. I've successfully got the ericsson/motd and puppetlabs/apt modules up and running and configured with appropriate with hiera, doing what I want in various environments. I'm trying (so far unsuccessfully) to use hiera to configure this module (https://forge.puppetlabs.com/jgazeley/ossec). r10k is configured to pull in the ossec module and dependencies (which it has). I'm simply attempting to set the ossec_server_ip parameter in the ossec::client class, but all I ever get is a "Must pass ossec_server_ip to Class[Ossec::Client]..." error. I get this from running a "puppet agent --test--noop" on an agent or running a puppet apply directly on the module. I feel like this should be incredibly simple and that I'm just missing something completely obvious. This is with the open-source puppetserver 4.2.1 on Ubuntu 14.04, with an agent running puppet 4.2.1 as well. /etc/puppetlabs/code/hiera.yaml (unchanged from default) --- :backends: - yaml :hierarchy: - "nodes/%{::trusted.certname}" - common :yaml: # datadir is empty here, so hiera uses its defaults: # - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix # - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata on Windows # When specifying a datadir, make sure the directory exists. :datadir: /etc/puppetlabs/code/environments/development/hieradata/common.yaml: --- classes: - 'profile::base' motd::motd_content: - 'This is a development environment. Booya!' apt::purge: sources.list.d: true apt::update: frequency: daily ossec::client::ossec_server_ip: <ip_address> /etc/puppetlabs/code/environments/development/site/profile/manifests/base.pp class profile::base { class { '::motd': } class { '::apt': } class { '::ossec::client': } } Trying to "make it go": root@vm:/etc/puppetlabs/code/environments# puppet agent --test --noop Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass ossec_server_ip to Class[Ossec::Client] at /etc/puppetlabs/code/ environments/development/site/profile/manifests/base.pp:4 on node puppet. development.vm Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Any help/suggestions/pointers greatly appreciated. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5a2a8004-ae32-4af1-88e1-3fe1da352167%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. --- LMAX Exchange, Yellow Building, 1A Nicholas Road, London W11 4AN http://www.LMAX.com/ #1 Fastest Growing Tech Company in the UK - Sunday Times Tech Track 100 (2014) 2015 Best Margin Sector Platform - Profit & Loss Readers' Choice Awards 2015 Best FX Trading Venue - ECN/MTF - WSL Institutional Trading Awards 2014 Best Margin Sector Platform - Profit & Loss Readers' Choice Awards 2014 Best FX Trading Venue - ECN/MTF - WSL Institutional Trading Awards 2014 Best Infrastructure/Technology Initiative - WSL Institutional Trading Awards 2013 #15 Fastest Growing Tech Company in the UK - Sunday Times Tech Track 100 2013 Best Overall Testing Project - The European Software Testing Awards 2013 Best Margin Sector Platform - Profit & Loss Readers' Choice Awards 2013 Best FX Trading Platform - ECN/MTF - WSL Institutional Trading Awards 2013 Best Executing Venue - Forex Magnates Awards --- FX and CFDs are leveraged products that can result in losses exceeding your deposit. They are not suitable for everyone so please ensure you fully understand the risks involved. This message and its attachments are confidential, may not be disclosed or used by any person other than the addressee and are intended only for the named recipient(s). This message is not intended for any recipient(s) who based on their nationality, place of business, domicile or for any other reason, is/are subject to local laws or regulations which prohibit the provision of such products and services. This message is subject to the following terms (http://lmax.com/pdf/general-disclaimers.pdf), if you cannot access these, please notify us by replying to this email and we will send you the terms. If you are not the intended recipient, please notify the sender immediately and delete any copies of this message. LMAX Exchange is the trading name of LMAX Limited. LMAX Limited operates a multilateral trading facility. LMAX Limited is authorised and regulated by the Financial Conduct Authority (firm registration number 509778) and is a company registered in England and Wales (number 6505809). LMAX Hong Kong Limited is a wholly-owned subsidiary of LMAX Limited. LMAX Hong Kong is licensed by the Securities and Futures Commission in Hong Kong to conduct Type 3 (leveraged foreign exchange trading) regulated activity with CE Number BDV088. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/845900247.150399.1441784051800.JavaMail.zimbra%40lmax.com. For more options, visit https://groups.google.com/d/optout.
