Jake,
I want to do something like this...
# puppet apply --modulepath=/etc/puppet/modules site.pp "somevalue1" 
"somevalue2"

is this possible?
Regards
Sachin

On Monday, 9 December 2013 11:48:16 UTC-8, Jake Lundberg wrote:
>
> 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/1cd00344-976a-48fd-a466-47873b2b8db4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to