Oops, that should probably read:
exec { "do something" :
command => "/usr/local/bin/exec_something.sh ${param1} ${param2}"
}
On Monday, December 9, 2013 11:46:17 AM UTC-8, Jake Lundberg wrote:
>
> I suppose it depends on how you structure your manifest. We typically
> apply a manifest to a particular node when testing new manifests. So
> something like:
>
> site.pp:
> node default {
> $param1 = "value1"
> $param2 = "value2"
>
> include exec_class
> }
>
> /etc/puppet/modules/exec_class/manifests/init.pp
> class exec_class ( $param1, $param2) {
>
> exec { "do something" :
> command => "/usr/local/bin/exec_something.sh"
> }
> }
>
> # puppet apply --modulepath=/etc/puppet/modules site.pp
>
> I also think you can pass parameters via facter:
> http://stackoverflow.com/questions/15901850/pass-variable-to-puppet-on-commandline
>
> On Sunday, December 8, 2013 7:31:27 PM UTC-8, Sachin Nikam wrote:
>>
>> I am newbie to puppet(versin 2.7) and came up with a manifest that
>> contains some "exec" tasks. when I invoke the puppet apply <manifest>, I
>> want to pass in some parameters specific to my application. How do I do
>> that? I searched the online documentation but couldn't find any examples.
>> Regards
>> Sachin
>>
>
--
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/81157a24-fa6e-46fa-ac71-4a4474a5ab55%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.