I am creating a "define" to manage cups printers on many servers and would like to export the necessary ''file'' and ''exec'' resources with multiple tags so i can be selective about what is realized on what servers but i don''t seem to be able to get it working with multiple tags. The following examples do not work and i would expect them too. example 1: # Export resource test w/ mulitple tags. @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}", tag => [ "exp-res-test-${fqdn}", "exp-res-test-${domain}", "exp-res-test-all" ]; } File<<| tag == "exp-res-test-${fqdn}" |>> On examining the database the resource is created and exported but non of the requested tags are created, only the autotags. example 2: # Export resource test w/ mulitple tags using a define. define exp-res-test () { tag("exp-res-test-${fqdn}") tag("exp-res-test-${domain}") tag("exp-res-test-all") @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}"; } } exp-res-test { testing: } File<<| tag == "exp-res-test-${fqdn}" |>> Looking at the database for this one things are looking better, the resource is created, exported and all the requested tags are associated with it but the resource is not realized by the ''File<<| tag == "exp-res-test-${fqdn}" |>>'' and the file is never created. I have tried a number of other configurations with no success. Am i missing something or is this a bug? Thanks, Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-May-09 05:50 UTC
[Puppet Users] Re: exported res with multiple tags not working
On May 6, 2009, at 7:36 PM, Ben wrote:> > I am creating a "define" to manage cups printers on many servers and > would like to export the necessary ''file'' and ''exec'' resources with > multiple tags so i can be selective about what is realized on what > servers but i don''t seem to be able to get it working with multiple > tags. > > The following examples do not work and i would expect them too. > > example 1: > > # Export resource test w/ mulitple tags. > @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}", > tag => [ "exp-res-test-${fqdn}", > "exp-res-test-${domain}", "exp-res-test-all" ]; > } > File<<| tag == "exp-res-test-${fqdn}" |>> > > On examining the database the resource is created and exported but non > of the requested tags are created, only the autotags. > > example 2: > > # Export resource test w/ mulitple tags using a define. > define exp-res-test () { > tag("exp-res-test-${fqdn}") > tag("exp-res-test-${domain}") > tag("exp-res-test-all") > > @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}"; } > } > exp-res-test { testing: } > File<<| tag == "exp-res-test-${fqdn}" |>> > > Looking at the database for this one things are looking better, the > resource is created, exported and all the requested tags are > associated > with it but the resource is not realized by the ''File<<| tag => "exp-res-test-${fqdn}" |>>'' and the file is never created. > > I have tried a number of other configurations with no success. Am i > missing something or is this a bug?What version are you using? The tagging is a bit weird when searching for resources, because Puppet tries to match against any item in a list, but this should work for the most recent versions. -- Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it. -- Ellen DeGeneres --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On May 6, 2009, at 7:36 PM, Ben wrote: > > >> I am creating a "define" to manage cups printers on many servers and >> would like to export the necessary ''file'' and ''exec'' resources with >> multiple tags so i can be selective about what is realized on what >> servers but i don''t seem to be able to get it working with multiple >> tags. >> >> The following examples do not work and i would expect them too. >> >> example 1: >> >> # Export resource test w/ mulitple tags. >> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}", >> tag => [ "exp-res-test-${fqdn}", >> "exp-res-test-${domain}", "exp-res-test-all" ]; >> } >> File<<| tag == "exp-res-test-${fqdn}" |>> >> >> On examining the database the resource is created and exported but non >> of the requested tags are created, only the autotags. >> >> example 2: >> >> # Export resource test w/ mulitple tags using a define. >> define exp-res-test () { >> tag("exp-res-test-${fqdn}") >> tag("exp-res-test-${domain}") >> tag("exp-res-test-all") >> >> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}"; } >> } >> exp-res-test { testing: } >> File<<| tag == "exp-res-test-${fqdn}" |>> >> >> Looking at the database for this one things are looking better, the >> resource is created, exported and all the requested tags are >> associated >> with it but the resource is not realized by the ''File<<| tag =>> "exp-res-test-${fqdn}" |>>'' and the file is never created. >> >> I have tried a number of other configurations with no success. Am i >> missing something or is this a bug? >> > > > What version are you using? > > The tagging is a bit weird when searching for resources, because > Puppet tries to match against any item in a list, but this should work > for the most recent versions. > >Luke, I am using the latest. # rpm -q puppet puppet-0.24.8-1.el5.1 Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-May-11 22:43 UTC
[Puppet Users] Re: exported res with multiple tags not working
On May 10, 2009, at 6:48 PM, Ben wrote:> > Luke Kanies wrote: >> On May 6, 2009, at 7:36 PM, Ben wrote: >> >> >>> I am creating a "define" to manage cups printers on many servers and >>> would like to export the necessary ''file'' and ''exec'' resources with >>> multiple tags so i can be selective about what is realized on what >>> servers but i don''t seem to be able to get it working with multiple >>> tags. >>> >>> The following examples do not work and i would expect them too. >>> >>> example 1: >>> >>> # Export resource test w/ mulitple tags. >>> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}", >>> tag => [ "exp-res-test-${fqdn}", >>> "exp-res-test-${domain}", "exp-res-test-all" ]; >>> } >>> File<<| tag == "exp-res-test-${fqdn}" |>> >>> >>> On examining the database the resource is created and exported but >>> non >>> of the requested tags are created, only the autotags. >>> >>> example 2: >>> >>> # Export resource test w/ mulitple tags using a define. >>> define exp-res-test () { >>> tag("exp-res-test-${fqdn}") >>> tag("exp-res-test-${domain}") >>> tag("exp-res-test-all") >>> >>> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}"; } >>> } >>> exp-res-test { testing: } >>> File<<| tag == "exp-res-test-${fqdn}" |>> >>> >>> Looking at the database for this one things are looking better, the >>> resource is created, exported and all the requested tags are >>> associated >>> with it but the resource is not realized by the ''File<<| tag =>>> "exp-res-test-${fqdn}" |>>'' and the file is never created. >>> >>> I have tried a number of other configurations with no success. Am i >>> missing something or is this a bug? >>> >> >> >> What version are you using? >> >> The tagging is a bit weird when searching for resources, because >> Puppet tries to match against any item in a list, but this should >> work >> for the most recent versions. >> >> > Luke, > > I am using the latest. > > # rpm -q puppet > puppet-0.24.8-1.el5.1Then I guess it''s a bug. Please file it, and I''ll try to make sure it works in 0.25. -- It''s not that I''m afraid to die. I just don''t want to be there when it happens. -- Woody Allen --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On May 10, 2009, at 6:48 PM, Ben wrote: > > >> Luke Kanies wrote: >> >>> On May 6, 2009, at 7:36 PM, Ben wrote: >>> >>> >>> >>>> I am creating a "define" to manage cups printers on many servers and >>>> would like to export the necessary ''file'' and ''exec'' resources with >>>> multiple tags so i can be selective about what is realized on what >>>> servers but i don''t seem to be able to get it working with multiple >>>> tags. >>>> >>>> The following examples do not work and i would expect them too. >>>> >>>> example 1: >>>> >>>> # Export resource test w/ mulitple tags. >>>> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}", >>>> tag => [ "exp-res-test-${fqdn}", >>>> "exp-res-test-${domain}", "exp-res-test-all" ]; >>>> } >>>> File<<| tag == "exp-res-test-${fqdn}" |>> >>>> >>>> On examining the database the resource is created and exported but >>>> non >>>> of the requested tags are created, only the autotags. >>>> >>>> example 2: >>>> >>>> # Export resource test w/ mulitple tags using a define. >>>> define exp-res-test () { >>>> tag("exp-res-test-${fqdn}") >>>> tag("exp-res-test-${domain}") >>>> tag("exp-res-test-all") >>>> >>>> @@file { "/tmp/test-${fqdn}": content => "test ${fqdn}"; } >>>> } >>>> exp-res-test { testing: } >>>> File<<| tag == "exp-res-test-${fqdn}" |>> >>>> >>>> Looking at the database for this one things are looking better, the >>>> resource is created, exported and all the requested tags are >>>> associated >>>> with it but the resource is not realized by the ''File<<| tag =>>>> "exp-res-test-${fqdn}" |>>'' and the file is never created. >>>> >>>> I have tried a number of other configurations with no success. Am i >>>> missing something or is this a bug? >>>> >>>> >>> What version are you using? >>> >>> The tagging is a bit weird when searching for resources, because >>> Puppet tries to match against any item in a list, but this should >>> work >>> for the most recent versions. >>> >>> >>> >> Luke, >> >> I am using the latest. >> >> # rpm -q puppet >> puppet-0.24.8-1.el5.1 >> > > Then I guess it''s a bug. Please file it, and I''ll try to make sure it > works in 0.25. > >Done. http://projects.reductivelabs.com/issues/2246 Thanks. Ben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---