Hello, I have several modules that need to export the same sshkey resources with different tags each one, for example: # module backups @@sshkey { $fqdn: key => $sshrsakey, type => "rsa", tag => "backups_$fqdn", } # module ssh @@sshkey { $fqdn: key => $sshrsakey, type => "rsa", tag => "ssh_$fqdn", } this throws a duplicate definition error like: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct sshkey name or alias must be $fqdn to make ssh associate correct ssh_known_hosts line with the node, how can I export the same sshkey with different tags in separate modules? thanks! Lluís --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi> I have several modules that need to export the same sshkey resources > with different tags each one, for example: > > # module backups > @@sshkey { $fqdn: > key => $sshrsakey, > type => "rsa", > tag => "backups_$fqdn", > } > > # module ssh > @@sshkey { $fqdn: > key => $sshrsakey, > type => "rsa", > tag => "ssh_$fqdn", > } > > this throws a duplicate definition error like: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ctactually what are you doing is managing the same resource twice, hence the duplicate definition error. For puppet the variable labeled as `namevar` in the Reference has to be unique per resource for one host.> sshkey name or alias must be $fqdn to make ssh associate correct > ssh_known_hosts line with the node, how can I export the same sshkey > with different tags in separate modules?you can add multiple tags to one resource: @@sshkey { $fqdn: key => $sshrsakey, type => "rsa", tag => [ "backups_$fqdn", "ssh_$fqdn" ], } cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter Meier va escriure:> Hi > > > I have several modules that need to export the same sshkey resources > > with different tags each one, for example: > > > > # module backups > > @@sshkey { $fqdn: > > key => $sshrsakey, > > type => "rsa", > > tag => "backups_$fqdn", > > } > > > > # module ssh > > @@sshkey { $fqdn: > > key => $sshrsakey, > > type => "rsa", > > tag => "ssh_$fqdn", > > } > > > > this throws a duplicate definition error like: > > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > > Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in > > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct > > actually what are you doing is managing the same resource twice, hence > the duplicate definition error. For puppet the variable labeled as > `namevar` in the Reference has to be unique per resource for one host. > > > sshkey name or alias must be $fqdn to make ssh associate correct > > ssh_known_hosts line with the node, how can I export the same sshkey > > with different tags in separate modules? > > > you can add multiple tags to one resource: > > > @@sshkey { $fqdn: > key => $sshrsakey, > type => "rsa", > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > } > > cheers petethere''s any way to do this on different modules? thanks, Lluís --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, 2009-11-04 at 11:51 +0100, lluis wrote:> El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter Meier va escriure: > > Hi > > > > > I have several modules that need to export the same sshkey resources > > > with different tags each one, for example: > > > > > > # module backups > > > @@sshkey { $fqdn: > > > key => $sshrsakey, > > > type => "rsa", > > > tag => "backups_$fqdn", > > > } > > > > > > # module ssh > > > @@sshkey { $fqdn: > > > key => $sshrsakey, > > > type => "rsa", > > > tag => "ssh_$fqdn", > > > } > > > > > > this throws a duplicate definition error like: > > > > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > > > Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in > > > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct > > > > actually what are you doing is managing the same resource twice, hence > > the duplicate definition error. For puppet the variable labeled as > > `namevar` in the Reference has to be unique per resource for one host. > > > > > sshkey name or alias must be $fqdn to make ssh associate correct > > > ssh_known_hosts line with the node, how can I export the same sshkey > > > with different tags in separate modules? > > > > > > you can add multiple tags to one resource: > > > > > > @@sshkey { $fqdn: > > key => $sshrsakey, > > type => "rsa", > > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > > } > > > > cheers pete > > there''s any way to do this on different modules?Have this in a separate class that would be included in both module. You can even do: class mysshkey { @@sshkey { "$fqdn": key => $sshraskey, type => rsa; } } in backups: class backups::sshkey inherits mysshkey { Sshkey[$fqdn] { tag +> "backups_$fqdn" } } class backups { include backups::sshkey ... } in ssh: class ssh::sshkey inherits mysshkey { Sshkey[$fqdn] { tag +> "ssh_$fqdn" } } class ssh { include ssh::sshkey ... } Or a variation of this... -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
El dc 04 de 11 de 2009 a les 12:06 +0100, en/na Brice Figureau va escriure:> On Wed, 2009-11-04 at 11:51 +0100, lluis wrote: > > El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter Meier va escriure: > > > Hi > > > > > > > I have several modules that need to export the same sshkey resources > > > > with different tags each one, for example: > > > > > > > > # module backups > > > > @@sshkey { $fqdn: > > > > key => $sshrsakey, > > > > type => "rsa", > > > > tag => "backups_$fqdn", > > > > } > > > > > > > > # module ssh > > > > @@sshkey { $fqdn: > > > > key => $sshrsakey, > > > > type => "rsa", > > > > tag => "ssh_$fqdn", > > > > } > > > > > > > > this throws a duplicate definition error like: > > > > > > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > > > > Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in > > > > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct > > > > > > actually what are you doing is managing the same resource twice, hence > > > the duplicate definition error. For puppet the variable labeled as > > > `namevar` in the Reference has to be unique per resource for one host. > > > > > > > sshkey name or alias must be $fqdn to make ssh associate correct > > > > ssh_known_hosts line with the node, how can I export the same sshkey > > > > with different tags in separate modules? > > > > > > > > > you can add multiple tags to one resource: > > > > > > > > > @@sshkey { $fqdn: > > > key => $sshrsakey, > > > type => "rsa", > > > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > > > } > > > > > > cheers pete > > > > there''s any way to do this on different modules? > > Have this in a separate class that would be included in both module. > You can even do: > > class mysshkey { > @@sshkey { > "$fqdn": > key => $sshraskey, type => rsa; > } > } > > in backups: > > class backups::sshkey inherits mysshkey { > Sshkey[$fqdn] { tag +> "backups_$fqdn" } > } > > class backups { > include backups::sshkey > ... > } > > in ssh: > > class ssh::sshkey inherits mysshkey { > Sshkey[$fqdn] { tag +> "ssh_$fqdn" } > } > > class ssh { > include ssh::sshkey > ... > } > > Or a variation of this...thanks! this is exactly what I was looking for, but I can''t make it work; including both ssh and backups classes throws this error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Parameter ''tag'' is already set on Sshkey[vbox1.ingent.ct] by ssh_station::server::sshkey at /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp:43; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:205 on node vbox1.ingent.ct instead of exporting sshkey with the two tags --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Nov 4, 2009 at 12:53 PM, lluis <lluis@ingent.net> wrote:> > El dc 04 de 11 de 2009 a les 12:06 +0100, en/na Brice Figureau va > escriure: > > On Wed, 2009-11-04 at 11:51 +0100, lluis wrote: > > > El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter Meier va > escriure: > > > > Hi > > > > > > > > > I have several modules that need to export the same sshkey > resources > > > > > with different tags each one, for example: > > > > > > > > > > # module backups > > > > > @@sshkey { $fqdn: > > > > > key => $sshrsakey, > > > > > type => "rsa", > > > > > tag => "backups_$fqdn", > > > > > } > > > > > > > > > > # module ssh > > > > > @@sshkey { $fqdn: > > > > > key => $sshrsakey, > > > > > type => "rsa", > > > > > tag => "ssh_$fqdn", > > > > > } > > > > > > > > > > this throws a duplicate definition error like: > > > > > > > > > > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: > > > > > Duplicate definition: Sshkey[vbox1.ingent.ct] is already defined in > > > > > file > /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line > 36; cannot redefine at > /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on > node vbox1.ingent.ct > > > > > > > > actually what are you doing is managing the same resource twice, > hence > > > > the duplicate definition error. For puppet the variable labeled as > > > > `namevar` in the Reference has to be unique per resource for one > host. > > > > > > > > > sshkey name or alias must be $fqdn to make ssh associate correct > > > > > ssh_known_hosts line with the node, how can I export the same > sshkey > > > > > with different tags in separate modules? > > > > > > > > > > > > you can add multiple tags to one resource: > > > > > > > > > > > > @@sshkey { $fqdn: > > > > key => $sshrsakey, > > > > type => "rsa", > > > > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > > > > } > > > > > > > > cheers pete > > > > > > there''s any way to do this on different modules? > > > > Have this in a separate class that would be included in both module. > > You can even do: > > > > class mysshkey { > > @@sshkey { > > "$fqdn": > > key => $sshraskey, type => rsa; > > } > > } > > > > in backups: > > > > class backups::sshkey inherits mysshkey { > > Sshkey[$fqdn] { tag +> "backups_$fqdn" } > > } > > > > class backups { > > include backups::sshkey > > ... > > } > > > > in ssh: > > > > class ssh::sshkey inherits mysshkey { > > Sshkey[$fqdn] { tag +> "ssh_$fqdn" } > > } > > > > class ssh { > > include ssh::sshkey > > ... > > } > > > > Or a variation of this... > > thanks! this is exactly what I was looking for, but I can''t make it > work; including both ssh and backups classes throws this error: > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Parameter ''tag'' is already set on Sshkey[vbox1.ingent.ct] by > ssh_station::server::sshkey > at /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp:43; > cannot redefine at > /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:205 on > node vbox1.ingent.ct > > instead of exporting sshkey with the two tags > >You need to remove the sshkey[vbox1.ingent.ct] resource from both of your classes. Create a third class and include that class in the ssh and backup classes. The basic idea is that you want to define the resource in one place and reuse it in many place so that there is no ambiguity. -teyo -- Teyo Tyree :: www.reductivelabs.com :: +1.615.275.5066 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
El dc 04 de 11 de 2009 a les 13:43 +0100, en/na Teyo Tyree va escriure:> > > On Wed, Nov 4, 2009 at 12:53 PM, lluis <lluis@ingent.net> wrote: > > El dc 04 de 11 de 2009 a les 12:06 +0100, en/na Brice Figureau > va > escriure: > > > On Wed, 2009-11-04 at 11:51 +0100, lluis wrote: > > > El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter > Meier va escriure: > > > > Hi > > > > > > > > > I have several modules that need to export the same > sshkey resources > > > > > with different tags each one, for example: > > > > > > > > > > # module backups > > > > > @@sshkey { $fqdn: > > > > > key => $sshrsakey, > > > > > type => "rsa", > > > > > tag => "backups_$fqdn", > > > > > } > > > > > > > > > > # module ssh > > > > > @@sshkey { $fqdn: > > > > > key => $sshrsakey, > > > > > type => "rsa", > > > > > tag => "ssh_$fqdn", > > > > > } > > > > > > > > > > this throws a duplicate definition error like: > > > > > > > > > > err: Could not retrieve catalog from remote server: > Error 400 on SERVER: > > > > > Duplicate definition: Sshkey[vbox1.ingent.ct] is > already defined in > > > > > > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct > > > > > > > > actually what are you doing is managing the same > resource twice, hence > > > > the duplicate definition error. For puppet the variable > labeled as > > > > `namevar` in the Reference has to be unique per resource > for one host. > > > > > > > > > sshkey name or alias must be $fqdn to make ssh > associate correct > > > > > ssh_known_hosts line with the node, how can I export > the same sshkey > > > > > with different tags in separate modules? > > > > > > > > > > > > you can add multiple tags to one resource: > > > > > > > > > > > > @@sshkey { $fqdn: > > > > key => $sshrsakey, > > > > type => "rsa", > > > > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > > > > } > > > > > > > > cheers pete > > > > > > there''s any way to do this on different modules? > > > > Have this in a separate class that would be included in both > module. > > You can even do: > > > > class mysshkey { > > @@sshkey { > > "$fqdn": > > key => $sshraskey, type => rsa; > > } > > } > > > > in backups: > > > > class backups::sshkey inherits mysshkey { > > Sshkey[$fqdn] { tag +> "backups_$fqdn" } > > } > > > > class backups { > > include backups::sshkey > > ... > > } > > > > in ssh: > > > > class ssh::sshkey inherits mysshkey { > > Sshkey[$fqdn] { tag +> "ssh_$fqdn" } > > } > > > > class ssh { > > include ssh::sshkey > > ... > > } > > > > Or a variation of this... > > > thanks! this is exactly what I was looking for, but I can''t > make it > work; including both ssh and backups classes throws this > error: > > > err: Could not retrieve catalog from remote server: Error 400 > on SERVER: > > Parameter ''tag'' is already set on Sshkey[vbox1.ingent.ct] by > ssh_station::server::sshkey > at /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp:43; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:205 on node vbox1.ingent.ct > > instead of exporting sshkey with the two tags > > > > You need to remove the sshkey[vbox1.ingent.ct] resource from both of > your classes. Create a third class and include that class in the ssh > and backup classes. The basic idea is that you want to define the > resource in one place and reuse it in many place so that there is no > ambiguity. > > -teyo* I moved sshkey resource to a third class "ssh_key": class ssh_key { @@sshkey { "$fqdn": ensure=>present, key=>$sshrsakey, type=>rsa; } } * in backup module I created a class that inherits from ssh_key and adds a tag to sshkey resource: class webserver1::backups_server::sshkey inherits ssh_key { Sshkey[$fqdn] { tag +> "backups_$fqdn" } } * I included this class on backups: class webserver1::backups { include webserver1::backups_server::sshkey } * I did the same in ssh module: class ssh_station::client::sshkey inherits ssh_key { Sshkey[$fqdn] { tag +> "ssh_$fqdn" } } class ssh_station::client { include ssh_station::client::sshkey } node includes both ssh_station::client and webserver1::backups classes, I expect to export his sshkey with ssh_$fqdn and backups_$fqdn tags, but "Parameter ''tag'' is already set" error is thrown instead, I''m doing something wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi again, I did this simple test manifest: class test { sshkey { "$fqdn": ensure=>present, key=>$sshrsakey, type=>rsa; } } class subclass1 inherits test { Sshkey["$fqdn"] { alias +> "subclass1" } } class subclass2 inherits test { Sshkey["$fqdn"] { alias +> "subclass2" } } node debian { include subclass1 include subclass2 } running puppet on it shows this: lluis@debian:~$ puppet test.pp Parameter ''alias'' is already set on Sshkey[debian.ingent.local] by subclass1 at /home/lluis/test.pp:11; cannot redefine at /home/lluis/test.pp:15 on node debian.ingent.local what I''m doing wrong? El dc 04 de 11 de 2009 a les 13:58 +0100, en/na lluis va escriure:> > El dc 04 de 11 de 2009 a les 13:43 +0100, en/na Teyo Tyree va escriure: > > > > > > On Wed, Nov 4, 2009 at 12:53 PM, lluis <lluis@ingent.net> wrote: > > > > El dc 04 de 11 de 2009 a les 12:06 +0100, en/na Brice Figureau > > va > > escriure: > > > > > On Wed, 2009-11-04 at 11:51 +0100, lluis wrote: > > > > El dc 04 de 11 de 2009 a les 11:21 +0100, en/na Peter > > Meier va escriure: > > > > > Hi > > > > > > > > > > > I have several modules that need to export the same > > sshkey resources > > > > > > with different tags each one, for example: > > > > > > > > > > > > # module backups > > > > > > @@sshkey { $fqdn: > > > > > > key => $sshrsakey, > > > > > > type => "rsa", > > > > > > tag => "backups_$fqdn", > > > > > > } > > > > > > > > > > > > # module ssh > > > > > > @@sshkey { $fqdn: > > > > > > key => $sshrsakey, > > > > > > type => "rsa", > > > > > > tag => "ssh_$fqdn", > > > > > > } > > > > > > > > > > > > this throws a duplicate definition error like: > > > > > > > > > > > > err: Could not retrieve catalog from remote server: > > Error 400 on SERVER: > > > > > > Duplicate definition: Sshkey[vbox1.ingent.ct] is > > already defined in > > > > > > > > file /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp at line 36; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:200 on node vbox1.ingent.ct > > > > > > > > > > actually what are you doing is managing the same > > resource twice, hence > > > > > the duplicate definition error. For puppet the variable > > labeled as > > > > > `namevar` in the Reference has to be unique per resource > > for one host. > > > > > > > > > > > sshkey name or alias must be $fqdn to make ssh > > associate correct > > > > > > ssh_known_hosts line with the node, how can I export > > the same sshkey > > > > > > with different tags in separate modules? > > > > > > > > > > > > > > > you can add multiple tags to one resource: > > > > > > > > > > > > > > > @@sshkey { $fqdn: > > > > > key => $sshrsakey, > > > > > type => "rsa", > > > > > tag => [ "backups_$fqdn", "ssh_$fqdn" ], > > > > > } > > > > > > > > > > cheers pete > > > > > > > > there''s any way to do this on different modules? > > > > > > Have this in a separate class that would be included in both > > module. > > > You can even do: > > > > > > class mysshkey { > > > @@sshkey { > > > "$fqdn": > > > key => $sshraskey, type => rsa; > > > } > > > } > > > > > > in backups: > > > > > > class backups::sshkey inherits mysshkey { > > > Sshkey[$fqdn] { tag +> "backups_$fqdn" } > > > } > > > > > > class backups { > > > include backups::sshkey > > > ... > > > } > > > > > > in ssh: > > > > > > class ssh::sshkey inherits mysshkey { > > > Sshkey[$fqdn] { tag +> "ssh_$fqdn" } > > > } > > > > > > class ssh { > > > include ssh::sshkey > > > ... > > > } > > > > > > Or a variation of this... > > > > > > thanks! this is exactly what I was looking for, but I can''t > > make it > > work; including both ssh and backups classes throws this > > error: > > > > > > err: Could not retrieve catalog from remote server: Error 400 > > on SERVER: > > > > Parameter ''tag'' is already set on Sshkey[vbox1.ingent.ct] by > > ssh_station::server::sshkey > > at /home/lluis/git/initr/puppet/modules/ssh_station/manifests/server.pp:43; cannot redefine at /home/lluis/git/initr/puppet/modules/webserver1/manifests/init.pp:205 on node vbox1.ingent.ct > > > > instead of exporting sshkey with the two tags > > > > > > > > You need to remove the sshkey[vbox1.ingent.ct] resource from both of > > your classes. Create a third class and include that class in the ssh > > and backup classes. The basic idea is that you want to define the > > resource in one place and reuse it in many place so that there is no > > ambiguity. > > > > -teyo > > * I moved sshkey resource to a third class "ssh_key": > > class ssh_key { > @@sshkey { > "$fqdn": > ensure=>present, > key=>$sshrsakey, > type=>rsa; > } > } > > * in backup module I created a class that inherits from ssh_key and adds > a tag to sshkey resource: > > class webserver1::backups_server::sshkey inherits ssh_key { > Sshkey[$fqdn] { tag +> "backups_$fqdn" } > } > > * I included this class on backups: > > class webserver1::backups { > include webserver1::backups_server::sshkey > } > > * I did the same in ssh module: > > class ssh_station::client::sshkey inherits ssh_key { > Sshkey[$fqdn] { tag +> "ssh_$fqdn" } > } > > class ssh_station::client { > include ssh_station::client::sshkey > } > > node includes both ssh_station::client and webserver1::backups classes, > I expect to export his sshkey with ssh_$fqdn and backups_$fqdn tags, but > "Parameter ''tag'' is already set" error is thrown instead, I''m doing > something wrong? > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 2009-11-05 at 11:11 +0100, lluis wrote:> Hi again, I did this simple test manifest: > > class test { > sshkey { > "$fqdn": > ensure=>present, > key=>$sshrsakey, > type=>rsa; > } > } > > class subclass1 inherits test { > Sshkey["$fqdn"] { alias +> "subclass1" } > } > > class subclass2 inherits test { > Sshkey["$fqdn"] { alias +> "subclass2" } > } > > node debian { > include subclass1 > include subclass2 > } > > running puppet on it shows this: > lluis@debian:~$ puppet test.pp > Parameter ''alias'' is already set on Sshkey[debian.ingent.local] by > subclass1 at /home/lluis/test.pp:11; cannot redefine > at /home/lluis/test.pp:15 on node debian.ingent.local > > what I''m doing wrong?Nothing, it looks to me like it is a bug. Can you try on 0.24.8 and see if this is a regression? Can you file a bug report (including your example manifest above) at: http://projects.reductivelabs.com/projects/puppet -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
El dj 05 de 11 de 2009 a les 13:25 +0100, en/na Brice Figureau va escriure:> On Thu, 2009-11-05 at 11:11 +0100, lluis wrote: > > Hi again, I did this simple test manifest: > > > > class test { > > sshkey { > > "$fqdn": > > ensure=>present, > > key=>$sshrsakey, > > type=>rsa; > > } > > } > > > > class subclass1 inherits test { > > Sshkey["$fqdn"] { alias +> "subclass1" } > > } > > > > class subclass2 inherits test { > > Sshkey["$fqdn"] { alias +> "subclass2" } > > } > > > > node debian { > > include subclass1 > > include subclass2 > > } > > > > running puppet on it shows this: > > lluis@debian:~$ puppet test.pp > > Parameter ''alias'' is already set on Sshkey[debian.ingent.local] by > > subclass1 at /home/lluis/test.pp:11; cannot redefine > > at /home/lluis/test.pp:15 on node debian.ingent.local > > > > what I''m doing wrong? > > Nothing, it looks to me like it is a bug. > Can you try on 0.24.8 and see if this is a regression? > > Can you file a bug report (including your example manifest above) at: > http://projects.reductivelabs.com/projects/puppet0.24.8 has the same behavior, filled #2790, thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---