Hi,

is it possible to choose the provider based on property?

For example, I'm trying to develop two different providers for same type
of resource. If i use path location on the local filesystem I want
provider "local" to be chosen, and if I use link property, then I want
provider "remote" to be chosen.

For example, this definition should chose provider 'local':

resource { 'a':
  path => '/some/local/disk.iso',
}


And this definition should chose provider 'remote':

resource { 'a':
  link => 'http://example.com/disk.iso',
}

Is this possible without manually specifying "provider => remote"?




Also, second question. It would be great if puppet could raise error in
case when both conflicting properties are set. For example this should
yeild an error:

resource { 'a':
  path => '/some/local/disk.iso',
  link => 'http://example.com/disk.iso',
}

Is this possible?


If these questions are more suitable to puppet-dev list, I will post
them there. Thank you guys.

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to