I have a python task in Puppet. Passing a parameter into the task. Need to 
check the parameter in the code.
This what the code check looks like

if {params['date'] == "yesterday"}:
  print("Not Yesterday"}

The if statement doesn't work when run from Puppet Console. Prints 
Yesterday no matter what the parameter is. Not sure why. 

I can get the same thing to work from the command line with the following

if sys.argv[1] == "yesterday"
  print("Not Yesterday"}

Why do the parameters behave differently in Puppet? Any help in resolving 
this would be 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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to