Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-31 Thread José Luis Ledesma
Hi, this doesn't work. You cannot have two resources with the same name: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Host[] is already declared in file X/init.pp:17; cannot redeclare at /host.pp:5 on node X regards, On Wed, Jul

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-31 Thread jcbollinger
On Thursday, July 31, 2014 2:43:42 AM UTC-5, Jose Luis Ledesma wrote: Hi, this doesn't work. You cannot have two resources with the same name: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Host[] is already declared in file

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-30 Thread Jason Antman
Just in case anyone comes by this in the future, maybe I'm missing something, but why not keep this really simple (did you read the type reference docs for host?): @@host { ${::hostname}_exported : name= $::hostname, ensure = present, ip = $secondary_ip, } host {

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-15 Thread jcbollinger
On Monday, July 14, 2014 8:55:38 AM UTC-5, Kristof Willaert wrote: [snip] You will not be able to collect that resource on the node that exports it (you would again -- and rightfully -- get a duplicate resource complaint), but I think otherwise you should be ok. The documentation

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-15 Thread José Luis Ledesma
It worked as you thought. Many thanks, perhaps the code is not so nice, but the config applied is, by far, better. Regards, El 15/07/2014 15:24, jcbollinger john.bollin...@stjude.org escribió: On Monday, July 14, 2014 8:55:38 AM UTC-5, Kristof Willaert wrote: [snip] You will not be able

[Puppet Users] Re: duplicated resource with an exported resource

2014-07-14 Thread jcbollinger
On Saturday, July 12, 2014 6:05:35 AM UTC-5, Jose Luis Ledesma wrote: Hi all, I have found a problem setting up exported resources. The problem is that for every hosts I want to define in its /etc/hosts the primary ip, but I want to export a secondary ip with the same hostname that

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-14 Thread Kristof Willaert
[snip] You will not be able to collect that resource on the node that exports it (you would again -- and rightfully -- get a duplicate resource complaint), but I think otherwise you should be ok. The documentation for exported resources suggests otherwise: Any node (including the node that

Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-14 Thread José Luis Ledesma
really nice workaround, thanks! On Mon, Jul 14, 2014 at 3:29 PM, jcbollinger john.bollin...@stjude.org wrote: On Saturday, July 12, 2014 6:05:35 AM UTC-5, Jose Luis Ledesma wrote: Hi all, I have found a problem setting up exported resources. The problem is that for every hosts I