Parameter doesn’t get passed into exec.

asked 2017-05-17 11:15:47 -0500

Steve1735 gravatar image

I have a module that is running an exec on a batch script with a string parameter passed into the cmd from the puppet console. The parameter is not getting passed when the exec runs. This module have been run on over 500 nodes with success but there are about a dozen that have the parameter issue.

edit retag flag offensive close merge delete

Comments

Can you post the exec code? Do those dozen servers differ by OS/version/shell?

smarlow gravatar imagesmarlow ( 2017-05-17 13:59:06 -0500 )edit

here is the exec statement. moat are w2k8 r2 but we had hundreds of those go just fine exec { 'run_updates': command => "C:/Windows/System32/cscript.exe AU_Install.vbs ${signoff_date}", cwd => 'C:/ProgramData/arv/Puppet/wsus_updates/', path => 'C:/ProgramData/arv/Puppet/wsus

Steve1735 gravatar imageSteve1735 ( 2017-05-17 15:21:46 -0500 )edit

unless => "C:/ProgramData/arv/Puppet/wsus_updates/check.bat ${signoff_date}", schedule => 'MaintWindow', notify => Reboot['after_run'], }

Steve1735 gravatar imageSteve1735 ( 2017-05-17 15:21:58 -0500 )edit

Steve, can you share error message from puppet console report ?

AnoopKumar gravatar imageAnoopKumar ( 2017-05-18 03:34:36 -0500 )edit

First thing to check would be that $signoff_date is actually what it is supposed to be for the failing nodes.

Henrik Lindberg gravatar imageHenrik Lindberg ( 2017-05-18 04:16:24 -0500 )edit