Skip to content

Instantly share code, notes, and snippets.

@vinzent
Created June 22, 2016 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinzent/149e8e853c63778dd2803d51ccdc3728 to your computer and use it in GitHub Desktop.
Save vinzent/149e8e853c63778dd2803d51ccdc3728 to your computer and use it in GitHub Desktop.
puppet defined test with strict_variables
$ /opt/puppetlabs/bin/puppet apply --strict_variables /tmp/test.pp
Error: Evaluation Error: Error while evaluating a Function Call, 'defined' parameter 'vals' expects a value of type String or Type, got Integer at /tmp/test.pp:4:5 on node tmueller-notebook.local
$myvar = 1
if !defined($myvar) {
notify { 'test': }
}
@vinzent
Copy link
Author

vinzent commented Jun 22, 2016

$ /opt/puppetlabs/bin/puppet --version
4.5.2

@vinzent
Copy link
Author

vinzent commented Jun 22, 2016

neeeds to be '$myvar' not just $myvar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment