On Mon, Jul 15, 2013 at 4:54 AM, Jakov Sosic <[email protected]> wrote:
>
> OK, I will basically do something like this, but I will implement my own
> transport-alike resource until you guys standardize this :)
>

Disclaimer, I don't work at Puppet Labs anymore, and this will be a
personal project as time permits.

This would be great! It would certainly avoid collisions... Eg. two
> different modules (couchbase and vmware for example) both bringing
> 'transport' resource with them...
>

Yep, that's the goal. I've seen interest managing database with puppet
device, and a common module could provide a standard pattern for these type
of usages.


> It would be a good idea to merge transport into stdlib.
>

It's probably too experimental at this point for me to send PR against
stdlib.

> OK, I will basically do something like this, but I will implement my own
> > transport-alike resource until you guys standardize this :)
>
> OK, I'm having a big problem ... How can I get the values from the other
> resource?
>
> For example:
>
> couchconnection { 'default':
>   username => 'admin',
>   password => 'admin',
> }
>
> couchbucket { 'test':
>   ramsize    => '64',
>   connection => Couchconnection['default'],
> }
>
>
> So, how can I get the value of username in my couchbucket 'create method'?
>
> I would like to have something like:
>
>   def create
>     username = @resource[:connection][:username]
>   end
>
>
> but that obviously doesn't work :-/
>

The one mistake in my original email was it was searching by resource by
name instead of reference, so perhaps it's as simple as fixing:

defaultto 'Transport[couch]' # or maybe defaultto "Transport['couch']"

If that's not the issue, then I'm not sure. I'll try to put together the
transport module when I get some spare time.

Thanks,

Nan

-- 
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