function lookup did not find a value [closed]

asked 2018-08-16 01:51:22 -0600

ThatGuyAUS gravatar image

bare with me as I am new to Puppet. recently got asked to implement puppet for opsworks for our environmentents. everything is setup to pull code from source control. am trying to get a module working with hiera.

below is what the module looks like:

test class

class svpatching ( $wuserver = hiera('wuserver'), $wsuspatchgroup = hiera('wsuspatchgroup'), $installday = hiera('installdate') ) {

class { 'wsus_client' :
  server_url             => $wuserver,
  target_group           => $wsuspatchgroup,
  auto_update_option     => $updateoption,
  scheduled_install_day  => $installday,
  scheduled_install_hour => 4,
  purge_values           => true
  }

}

the hiera.yaml looks like


version: 5 defaults:

datadir: data

datadir: /etc/puppetlabs/code/environments/%{::environment}/data data_hash: yaml_data

hierarchy: - name: "nodes" path: "nodes/%{trusted.certname}.yaml"

  • name: "environment" path: "environment/%{environment}.yaml"

  • name: "common" path: "common.yaml"

and the yaml file for the specific node it is looking at is at follows:


svpatching::wuserver: 'https://auinfutil01.serraview-au.local:8530' svpatching::wsuspatchgroup: 'UAT' svpatching::installdate: '3'

the full error it is getting is: C:\Windows\system32>puppet agent --verbose --onetime --noop Info: Using configured environment 'test' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Serve r Error: Function lookup() did not find a value for the name 'wuserver' (file: / etc/puppetlabs/code/environments/test/modules/svpatching/manifests/init.pp, line : 2) on node auuatpuppet02.serraview-au.local Info: Using cached catalog from environment 'test' Info: Applying configuration version 'ip-10-10-0-65-test-92b1e323bf7' Notice: Applied catalog in 0.24 seconds

is there something I am doing wrong?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ThatGuyAUS
close date 2018-08-17 00:52:18.249007