Jake,
Thanks for the info. My puppet manifest is doing the same thing as bash 
script. 
Regards
Sachin

On Monday, 9 December 2013 13:29:52 UTC-8, Jake Lundberg wrote:
>
> No, not like that.  
>
> You could create your own custom fact and use that via command line.  See: 
> http://www.practicalclouds.com/content/guide/converting-user-data-arguments-facts.
>  
>   It's not a perfect example, but does have some logic for parsing 
> arguments.
>
> As you're a self proclaimed newbie, this may take longer than you wish.   
>
> Another option is you can wrap creating your manifest (site.pp or imports) 
> in a script, but that's probably not the ideal solution.
>
> What are you trying to do?   Arbitrary remote execution of commands?   If 
> so, Puppet might not be the best platform.   Consider something like 
> Fabric/Capistrano, Ansible or Salt Stack (or just plain Bash).
>
>
> On Monday, December 9, 2013 12:50:44 PM UTC-8, Sachin Nikam wrote:
>>
>> 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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1575abe5-ee13-4f70-b26e-509290b0d13f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to