On Friday, December 11, 2015 at 10:49:40 AM UTC-8, John Bollinger wrote:
>
>
>
> On Friday, December 11, 2015 at 11:08:08 AM UTC-6, Corey Osman wrote:
>>
>> Hi,
>>
>> I am curious on a few things
>>
>> 1. Is the custom type code run on the node or master, makes sense the 
>> provider is but not sure about the type code.
>>
>
>
> As I understand it, a custom type's own code -- or at least parts of it -- 
> runs both in the agent and in the master.  To the best of my knowledge, 
> providers run only in the agent.
>
>  
>
So if I wanted to run some validation in the type code, where does that get 
run?  node or master?  The reason why I am asking because not only do I 
want to validate that the user specified a absolute path, but also verify 
the file exists.  But this would only work if the File.exists? method in 
the validate block for the type code is executed on the node.

 

>
>> 2. How would I use the commands syntax with a command path determined by 
>> parsing and XML file.  Or passed via the user.
>>
>>
>
> I don't think you can do.  Maybe the XML file would work, if you are 
> willing to assume that its contents to be in place and correct before the 
> first Puppet run, and to not thereafter change, but those are pretty strong 
> conditions.  I don't see how the user could provide the information via a 
> Puppet manifest, because it applies to the whole class, whereas user data 
> is specific to individual instances, and user data anywat comes into play 
> only after the suitability-determination aspects the declared commands 
> comes into play.
>
>  
>
>> Basically I was hoping to do something like this:
>>
>> https://github.com/logicminds/puppetlabs-ibm_installation_manager/blob/refactor/lib/puppet/provider/ibm_pkg/imcl.rb#L46
>>
>>
>
> I am uncertain where variable 'imcl_command_path' variable is coming from 
> in provider you point to, and uncertain whether that provider actually 
> works as intended.  If it does work reliably, then I presume the 
> constraints I gave earlier are satisfied (the data source is 
> pre-established, reliably correct, and unchanging for the duration of the 
> Puppet process in which the associated variable is used).
>
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev/e6f9b3aa-3322-4c2c-ac0c-ad8fca9734f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to