On Friday, October 5, 2018 at 8:20:51 AM UTC-7, Eirik Øverby wrote: > > On Tuesday, August 28, 2018 at 6:50:48 PM UTC+3, Branan Purvine-Riley > wrote: > >> Hi Jon, >> >> In Puppet 6 we're going to start requiring that the names of >> classes/defines match the name that's implied by their file path[1]. We >> added that deprecation warning in 5.5.6[2] as part of a push to get >> upcoming Puppet 6 changes printing warnings whenever possible. >> >> [1] https://tickets.puppetlabs.com/browse/PUP-1434 and >> https://tickets.puppetlabs.com/browse/PUP-4242 >> [2] https://tickets.puppetlabs.com/browse/PUP-8894 >> > > Since 5.5.6 our puppetserver has been issuing warnings of this kind: > Puppet Unacceptable location. The name 'bash' is unacceptable in file > '/usr/local/etc/puppet/modules.common/bash/manifests/init.pp' > > The init.pp file contains only this: > class bash { > package { "shells/bash": > ensure => installed, > } > } > > I am at a loss as to how I'm supposed to refactor this to make the warning > go away. We do need an init.pp, and I know that for style points we should > split this into a base class and a ::install class, but I refuse to believe > that this is *required* for something as simple as the above. I am also not > finding the documentation particularly helpful in this simple use-case. It > does look like it's complaining about absolutely every class we have > defined, no matter if we use only init.pp or properly-defined > directory/file hierarchy and -naming for the classes, defines, etc. > > Can someone help me nudge my neurons in a way that I understand what is > expected of me? > > /Eirik >
Hi Eirik, I have tried, but was unable to reproduce the issue you have described here in Puppet 5.5.6 (SHA 60de165 from https://github.com/puppetlabs/puppet/releases): kris.bosland@kris:puppet % git checkout 60de165 ±[6.0.0^0] Previous HEAD position was 06ad255754... Merge pull request #7097 from Magisus/device-fix HEAD is now at 60de165b86... Merge pull request #7007 from justinstoller/maint-pin-rake-more kris.bosland@kris:puppet % cat ../tmp/test/bash/manifests/init.pp ±[5.5.6^0] class bash { package { "shells/bash": ensure => installed, } } kris.bosland@kris:puppet % bx puppet apply --modulepath ../tmp/test -e 'class test { include bash }' ±[5.5.6^0] Notice: Compiled catalog for kris.bosland-c02kf9eafft1 in environment production in 0.01 seconds Notice: Applied catalog in 0.01 seconds kris.bosland@kris:puppet % Can you provide a more detailed example that fails for you? Thanks. -Kris -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/542e3b3b-20dc-4154-b8e5-945a3189ba4f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
