Re: [Puppet Users] Recent 5.5.x point releases are throwing some warnings for me

2019-06-14 Thread Ben Ford
Yes. A class without a namespace must be named the same as the module
containing it, *and be in the init.pp file*.

In other words, your /opt/puppetlabs/puppet/modules/adhoc/manifests/*adhoc*
.pp file should be /opt/puppetlabs/puppet/modules/adhoc/manifests/*init*.pp.

See https://puppet.com/docs/puppet/latest/modules_fundamentals.html for
more information.

On Fri, Jun 14, 2019 at 1:06 PM lhu  wrote:

> Hi John,
>
> Would you have any idea why this would fail
> file
> #puppet parser validate adhoc.pp
> Warning: Unacceptable location. The name 'adhoc' is unacceptable in file
> '/opt/puppetlabs/puppet/modules/adhoc/manifests/adhoc.pp' (file:
> /opt/puppetlabs/puppet/modules/adhoc/manifests/adhoc.pp, line: 1, column: 1)
>
> adhoc.pp file:
>
> class adhoc {
>
>
> }
>
> I put the file under
> /opt/puppetlabs/puppet/modules/adhoc/manifests
> this is running puppet 5.5 on a new install
>
> Thanks,
> Leo
>
> On Wednesday, August 29, 2018 at 9:58:32 AM UTC-4, Henrik Lindberg wrote:
>>
>> On 2018-08-29 15:11, jcbollinger wrote:
>> >
>> >
>> > On Tuesday, August 28, 2018 at 12:13:15 PM UTC-5, kris.b...@puppet.com
>> > wrote:
>> >
>> >
>> > Hi Jon,
>> >
>> > As you have read, this is part of our work implementing errors to
>> > enforce the standards set down in PUP-1434.  In particular, your
>> > example '$module_path/seed/manifests/init.pp' looks like it is in
>> > the init file of module 'seed'.  Assuming that is what you meant,
>> > anything starting with 'seed' would be OK in that file, e.g.
>> 'seed',
>> > 'seed::remote_file', 'seed::foo::remote_file' would all work.  Note
>> > that as part of point 4. of PUP-1434 (now being implemented in the
>> > work of PUP-9020), you will also not be allowed to put things like
>> > resources in the top level, but instead should include your
>> > resources in a class, define, function, or type declaration.
>> >
>> >
>> > As a matter of style, the usual recommendation is that furthermore,
>> > every class and defined type definition be located in its own file
>> > ,
>> > named as predicted from its fully-qualified name.  Of course, this is
>> > coupled with assigning an appropriate fully-qualified name.  It is
>> > important to understand that class and type names in Puppet are
>> > independent of the pathnames of the files in which the class and type
>> > definitions appear.  The importance of the pathnames is limited to
>> > enabling Puppet to /find/ type and class definitions at runtime.
>> >
>> >
>>
>> Not quite - what is now starting to be enforced is that definitions
>> must be made in a file that is on an accepted path for that definition.
>>
>> Best,
>> - henrik
>>
>> > John
>> >
>> > --
>> > 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 puppet...@googlegroups.com
>> > .
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/puppet-users/916271cc-6a49-4374-afe2-d6fe0dff297d%40googlegroups.com
>> > <
>> https://groups.google.com/d/msgid/puppet-users/916271cc-6a49-4374-afe2-d6fe0dff297d%40googlegroups.com?utm_medium=email_source=footer>.
>>
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>>
>> Visit my Blog "Puppet on the Edge"
>> http://puppet-on-the-edge.blogspot.se/
>>
>> --
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/dc9b55e8-f5c3-4622-a223-0d5df43e36db%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACkW_L5%2BdRHBapgkatd8Leu7-B5L5eVDNjSxLeD-cT%2BBVB1yAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Apache mod expires expires_by_type syntax example

2019-06-14 Thread Nat Juchems
Hey all -

I was getting pretty frustrated with this due to my own lack of 
understanding.  The best resource I could find on this was:

https://www.rubydoc.info/github/puppetlabs/puppetlabs-apache

Under the *apache::mod::expires* heading it says this:

expires_by_type: Describes a set of MIME content-type and their expiration 
times. Valid options: An array of Hashes, with each Hash's key a valid MIME 
content-type (i.e. 'text/json') and its value following valid interval 
syntax. Default: undef.

For me that was only a hint.  I had to find other examples with similar 
descriptions and actual examples to put it all together.  I am hoping that 
posting this here will make it easier for someone else in the future:

class { '::apache::mod::expires':
  expires_by_type => {
'image/gif' => 'access plus 12 hours',
'image/png'   => 'access plus 12 hours',
'image/jpeg'   => 'access plus 12 hours',
'image/svg+xml' => 'access plus 12 hours',
'image/x-icon' => 'access plus 2 weeks',
'application/javascript'=> 'access plus 1 hour',
'text/css' => 'access plus 1 hour',
'image/vnd.microsoft.icon' => 'access plus 2 weeks',
  }
}

Getting the MIME types figured out was a minor annoyance in comparison.

I am not setting this forth as a complete list or recommended settings.  
Just as an in the wild syntax example.

I added it to my blog too, just in case...

https://www.teamjuchems.com/2019/06/apache-mod-expires-and-puppet-syntax

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/37d7ac33-9a58-4793-bfcb-9a702653b89c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Bolt 1.23.0 now available

2019-06-14 Thread Puppet Product Updates
Greetings!

We're happy to announce the release of Bolt 1.23.0. Highlights in this
release include:

   - `catch_errors` function
   - Forge `baseurl` setting in the `puppetfile` config
   - Bug fixes

For more information, check out the release notes:
https://puppet.com/docs/bolt/latest/bolt_release_notes.html

To try this version of Bolt, follow the installation instructions for your
operating system:
https://puppet.com/docs/bolt/latest/bolt_installing.html

Thanks!

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B%2ByhkxZfnMGhSq5L7ZcOcyAkTKv6msJYFJyn5FM_s0bEmybPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Recent 5.5.x point releases are throwing some warnings for me

2019-06-14 Thread lhu
Hi John,

Would you have any idea why this would fail 
file
#puppet parser validate adhoc.pp
Warning: Unacceptable location. The name 'adhoc' is unacceptable in file 
'/opt/puppetlabs/puppet/modules/adhoc/manifests/adhoc.pp' (file: 
/opt/puppetlabs/puppet/modules/adhoc/manifests/adhoc.pp, line: 1, column: 1)

adhoc.pp file:

class adhoc {


}

I put the file under
/opt/puppetlabs/puppet/modules/adhoc/manifests
this is running puppet 5.5 on a new install

Thanks,
Leo

On Wednesday, August 29, 2018 at 9:58:32 AM UTC-4, Henrik Lindberg wrote:
>
> On 2018-08-29 15:11, jcbollinger wrote: 
> > 
> > 
> > On Tuesday, August 28, 2018 at 12:13:15 PM UTC-5, kris.b...@puppet.com 
> > wrote: 
> > 
> > 
> > Hi Jon, 
> > 
> > As you have read, this is part of our work implementing errors to 
> > enforce the standards set down in PUP-1434.  In particular, your 
> > example '$module_path/seed/manifests/init.pp' looks like it is in 
> > the init file of module 'seed'.  Assuming that is what you meant, 
> > anything starting with 'seed' would be OK in that file, e.g. 'seed', 
> > 'seed::remote_file', 'seed::foo::remote_file' would all work.  Note 
> > that as part of point 4. of PUP-1434 (now being implemented in the 
> > work of PUP-9020), you will also not be allowed to put things like 
> > resources in the top level, but instead should include your 
> > resources in a class, define, function, or type declaration. 
> > 
> > 
> > As a matter of style, the usual recommendation is that furthermore, 
> > every class and defined type definition be located in its own file 
> > , 
> > named as predicted from its fully-qualified name.  Of course, this is 
> > coupled with assigning an appropriate fully-qualified name.  It is 
> > important to understand that class and type names in Puppet are 
> > independent of the pathnames of the files in which the class and type 
> > definitions appear.  The importance of the pathnames is limited to 
> > enabling Puppet to /find/ type and class definitions at runtime. 
> > 
> > 
>
> Not quite - what is now starting to be enforced is that definitions 
> must be made in a file that is on an accepted path for that definition. 
>
> Best, 
> - henrik 
>
> > John 
> > 
> > -- 
> > 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 puppet...@googlegroups.com  
> > . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/916271cc-6a49-4374-afe2-d6fe0dff297d%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/puppet-users/916271cc-6a49-4374-afe2-d6fe0dff297d%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
> -- 
>
> Visit my Blog "Puppet on the Edge" 
> http://puppet-on-the-edge.blogspot.se/ 
>
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/dc9b55e8-f5c3-4622-a223-0d5df43e36db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] switching from source => "puppet:/// to source => "file:///

2019-06-14 Thread Locke Hajo
Hello,


> `file:///` sources are local to the *agent*, not the *puppetserver*
>

ahh, thanks, that was the missing info. did not found this in docs.

Thanks,
Hajo

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d4b3b279-4271-445a-8b88-7ce3ea451765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] switching from source => "puppet:/// to source => "file:///

2019-06-14 Thread David Schmitt
On Fri, 14 Jun 2019 at 08:45, Locke Hajo  wrote:

> Hello,
>
> I suspect that you're misunderstanding something about how Puppet works,
>> because as far as I can tell, you're trying to copy
>> /etc/apache2/conf.d/testpuppet.conf to /etc/apache2/conf.d/testpuppet.conf.
>> (The same path)
>>
>> yes i want to mirror a file from the master to my client. For me it seems
> to bo the best way to mirror original files and changes.
> Otherwise i would need a further machine as a master and put changes into
> puppet:/// structur.
>
> For type file source attribut can have values puppet: , file: and http:
> description for file is: file: URIs, which behave the same as local file
> paths.
> Why is it offered, if it should not be used? Do i understand something
> wrong?
>

`file:///` sources are local to the *agent*, not the *puppetserver*.
Puppet's philosophy is to manage nodes based on a controlled source base
(the control repo), not mirroring from a live machine. If you want to have
a guided tour of the what and how, please follow Ben's recommendation of
trying out the learning VM at https://learn.puppet.com


Cheers, David


>
> Thanks,
> Hajo
>
> --
> 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 puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/100af972-b436-4bc9-8c2c-92fc1f96c822%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALF7fHb3h1c3y0GrHQurNg3UQ0AAMa_JkejqVRmoB3%2B45f1%2B2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] switching from source => "puppet:/// to source => "file:///

2019-06-14 Thread Locke Hajo
Hello,

I suspect that you're misunderstanding something about how Puppet works, 
> because as far as I can tell, you're trying to copy 
> /etc/apache2/conf.d/testpuppet.conf to /etc/apache2/conf.d/testpuppet.conf. 
> (The same path) 
>
> yes i want to mirror a file from the master to my client. For me it seems 
to bo the best way to mirror original files and changes.
Otherwise i would need a further machine as a master and put changes into 
puppet:/// structur.

For type file source attribut can have values puppet: , file: and http:
description for file is: file: URIs, which behave the same as local file 
paths.
Why is it offered, if it should not be used? Do i understand something 
wrong?

Thanks,
Hajo

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/100af972-b436-4bc9-8c2c-92fc1f96c822%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.