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.

Reply via email to