[Puppet Users] Re: hiera deep hash merges broken

2017-02-14 Thread Daniel Urist
Just found this issue, which seems to describe what's going on:
https://github.com/TomPoulton/hiera-eyaml/issues/222
So eyaml is broken wrt hash merges? Are there any workarounds available?


On Tue, Feb 14, 2017 at 12:35 PM, Daniel Urist  wrote:

> To get deep hash merges in hiera, I have been using the following in my
> hiera.yaml:
>
>
>> ---
>> :merge_behavior: deeper
>> :backends:
>>   - eyaml
>
>
> And in one of my classes, a call to hiera_hash() like this:
>
> $if_merged = hiera_hash('profiles::pserver::interfaces')
>
>
> However, with  puppetserver version 2.7.2-1puppetlabs1, this is now broken
> and fails with this error:
>
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
>> Internal Server Error: org.jruby.exceptions.RaiseException: (Exception)
>> Hiera type mismatch: expected Hash and got Array
>
>
> I've tried commenting out ":merge_behavior: deeper" in hiera.yaml and
> using a lookup function instead:
>
> $if_merged = lookup('profiles::pserver::interfaces', Hash, 'deep')
>
>
> However, I'm not getting a merged hash when I do this.
>
> How can I get a deep merge hash?
>
>
>

-- 
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/CAEo6%3DKbeWQj9bM606fW%2BpFWeXee2guvinCJ8ffVx2%2Bxvq_PnXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera deep hash merges broken

2017-02-14 Thread Daniel Urist
To get deep hash merges in hiera, I have been using the following in my
hiera.yaml:


> ---
> :merge_behavior: deeper
> :backends:
>   - eyaml


And in one of my classes, a call to hiera_hash() like this:

$if_merged = hiera_hash('profiles::pserver::interfaces')


However, with  puppetserver version 2.7.2-1puppetlabs1, this is now broken
and fails with this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
> Internal Server Error: org.jruby.exceptions.RaiseException: (Exception)
> Hiera type mismatch: expected Hash and got Array


I've tried commenting out ":merge_behavior: deeper" in hiera.yaml and using
a lookup function instead:

$if_merged = lookup('profiles::pserver::interfaces', Hash, 'deep')


However, I'm not getting a merged hash when I do this.

How can I get a deep merge hash?

-- 
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/CAEo6%3DKbvqrNfMpNEHgfS%2BiTG%3Du%3D78BYMPbg83NzyOvTX%2B9ZDvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Why do my SERVER certs get revoked?

2017-02-14 Thread John Gelnaw
On Tuesday, February 14, 2017 at 11:56:27 AM UTC-5, Dayton Jones wrote:
>
> I'm intermittently getting 
>  Warning: SSL_connect returned=1 errno=0 state=SSLv3 read server 
> certificate B: certificate verify failed: [certificate revoked for 
> /CN=my.puppet.master] 
>
> when clients try to connect...this is very random and could go months 
> without the error, but I've got it several times in the last 3 days.  The 
> "fix" is stop the puppetmaster, remove it's certs/regen and restart 
> puppetmaster and then have the clients reattempt the connection...
>
> But WHY is the cert getting revoked?  What can I look at to see why this 
> happens, I've checked the logs but don't see anything that sticks out... 
>  Server/clients are all synced and agree on the time, DNS is working 
> properly... any pointers would be greatly appreciated.
>

Check your time on client and server.   

-- 
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/2fef0a46-770c-4090-bdb4-82e2cd49a51a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Language Style Guide update

2017-02-14 Thread Ramin K

Also a fan of David Walhstrom's git hooks and we use them server side too.

Ramin

On 2/13/17 10:36 AM, Christopher Wood wrote:

Same budget for tools here. I get along just fine with a combination of 
puppet-mode for emacs and the pre-commit hook from David Walhstrom's 
puppet-git-hooks project.

https://github.com/voxpupuli/puppet-mode

https://github.com/drwahl/puppet-git-hooks

(Although I obviously recommend you install the pre-receive hook on the server 
side of wherever you're pushing to.)

On Mon, Feb 13, 2017 at 09:24:51AM -0800, James Perry wrote:

   Are the any open source or free replacements for Geppetto?   RubyMine is
   like $200/year, which is outside of an IT budget of $0/year for tools.

   On Friday, January 13, 2017 at 5:03:48 AM UTC-5, Henrik Lindberg wrote:

 On 13/01/17 08:38, Peter Faller wrote:
 > Has the Gepetto auto-formatter been updated (or will it be updated) to
 > match the style guide? Or is there another way of automatically
 > formatting manifests to match the style guide?
 >

 Geppetto is pretty much up to date on the style guide as there are no
 fundamental changes to the formatting in terms of indentation and
 spacing. It is however somewhat behind on the language support as it has
 no understanding of the type system and some other recent additions.
 Geppetto is no longer maintained by Puppet as announced quite a long
 time ago.

 An IDE that has recently updated their support for Puppet is RubyMine.
 It is well worth taking a look at. Don't know what kind of formatting
 they offer though.

 Best,
 - henrik

 >
 > --
 > 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 [1]puppet-users...@googlegroups.com
 > .
 > To view this discussion on the web visit
 >
 
[3]https://groups.google.com/d/msgid/puppet-users/d36a42d7-d46e-4cc5-b198-8b7b396031e3%40googlegroups.com
 >
 
<[4]https://groups.google.com/d/msgid/puppet-users/d36a42d7-d46e-4cc5-b198-8b7b396031e3%40googlegroups.com?utm_medium=email_source=footer>.
 > For more options, visit [5]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 [6]puppet-users+unsubscr...@googlegroups.com.
   To view this discussion on the web visit
   
[7]https://groups.google.com/d/msgid/puppet-users/f0649350-e4df-4bf1-aa13-3f69978e6848%40googlegroups.com.
   For more options, visit [8]https://groups.google.com/d/optout.

References

   Visible links
   1. javascript:
   2. javascript:
   3. 
https://groups.google.com/d/msgid/puppet-users/d36a42d7-d46e-4cc5-b198-8b7b396031e3%40googlegroups.com
   4. 
https://groups.google.com/d/msgid/puppet-users/d36a42d7-d46e-4cc5-b198-8b7b396031e3%40googlegroups.com?utm_medium=email_source=footer
   5. https://groups.google.com/d/optout
   6. mailto:puppet-users+unsubscr...@googlegroups.com
   7. 
https://groups.google.com/d/msgid/puppet-users/f0649350-e4df-4bf1-aa13-3f69978e6848%40googlegroups.com?utm_medium=email_source=footer
   8. 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/996a47d8-59a5-8baf-cafc-97fccff9dfd7%40badapple.net.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5

2017-02-14 Thread Bob
Being that I have followed the default structure this time the following 
worked fine for me direct from the above link -

---
version: 5

defaults:
  datadir: data
  data_hash: yaml_data

hierarchy:
  - name: "Nodes"
path: "nodes/%{trusted.certname}.yaml"

  # Putting a JSON level between YAML levels like this
  # was impossible in the old format.
  - name: "Exported JSON nodes"
data_hash: json_data
paths:
  # Puppet checks these in order. Even though this is a single
  # item in the hierarchy, it acts like multiple hierarchy levels.
  - "nodes/%{trusted.certname}.json"
  - "insecure_nodes/%{facts.fqdn}.json"

  - name: "Virtualization platform"
path: "virtual/%{facts.virtual}.yaml"

  - name: "Common defaults"
path: "common.yaml"


On Wednesday, February 8, 2017 at 8:37:32 AM UTC+13, Joshua Schaeffer wrote:
>
> Okay I see that they are actually preparing to release Puppet 4.9.2 which 
> is supposed to fix these issues. Does this mean they will release a new 
> puppet-agent package part of the PC1? Where can I go to track the progress 
> of this minor release?
>
>>

-- 
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/cb2e7379-bece-4dcf-9f70-5f8d3289%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet erb template create loop

2017-02-14 Thread Rafael Tomelin
Hi dear,

I is create a module and need loop in puppet class and template


The my class step is:
1) My class have array declared;
$pools = [
{
  name   => 'PoolDiario',
  poolType   => 'Backup',
  recycle=> 'yes',
  autoPrune  => 'yes',
  volumeRetention=> '30 days',
  maximumVolumeBytes => '1G',
  maximumVolumes => '100',
  labelFormat=> 'Local-'
}
,
{
  name   => 'PoolDiario2',
  poolType   => 'Backup2',
  recycle=> 'yes',
  autoPrune  => 'yes',
  volumeRetention=> '20 days',
  maximumVolumeBytes => '5G',
  maximumVolumes => '10',
  labelFormat=> 'Local2'
}
]) 

2) The array is create file;
example:

count array$pools

  $teste = $pools[COUNT]['name']

#LOOP
  file { "/etc/bacula/pool/pool_$teste.conf":
ensure  => 'file',
owner   => 'bacula',
group   => 'bacula',
content => template('bacula/director/pool_conf.erb')
  }


3) Template loop get array.
Pool {
<% pools.each do |pool| -%>
  Name = "<%= pool['name'] %>"
  Pool Type = "<%= pool['poolType'] %>"
  Recycle = <%= pool['recycle'] %>
  AutoPrune = <%= pool['autoPrune'] %>
  Volume Retention = "<%= pool['volumeRetention'] %>"
  Maximum Volume Bytes = "<%= pool['maximumVolumeBytes'] %>" 
  Maximum Volumes = <%= pool['maximumVolumes'] %>
  Label Format = "<%= pool['labelFormat'] %>"

<% end -%>
}


But this create Pool to array.

I can make this module?


-- 
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/b76ca740-d7f6-4dd6-8079-43bc72700c06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5

2017-02-14 Thread Bob
I found that although that fixed my error, I got no data.

Turns out this is because you need a hiera.yaml in each environment folder 
with the datadir specified to that environment (if you are using a 
hieradata folder specific to each environment.

I also needed to change puppet.conf and add environment_data_provider = 
hiera

On Wednesday, February 8, 2017 at 8:37:32 AM UTC+13, Joshua Schaeffer wrote:
>
> Okay I see that they are actually preparing to release Puppet 4.9.2 which 
> is supposed to fix these issues. Does this mean they will release a new 
> puppet-agent package part of the PC1? Where can I go to track the progress 
> of this minor release?
>
>>

-- 
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/d32d9920-488d-4679-9691-cff6c11ebd3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Infortmatica Installation using puppet Manifest

2017-02-14 Thread Mahender Mahende
Hi Team,

Could someone help me out for writing the manifest to install the 
Informatica using the puppet manifest.



Thanks,
Mahender

-- 
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/2b9fda1e-b322-4e05-b9c1-8653bd56ee9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet reporting

2017-02-14 Thread Bob
I use puppetdb along with pupperboard, gives a really nice interface and 
works with puppet 3+4

Also can be puppet'd itself.

On Friday, February 10, 2017 at 3:13:24 AM UTC+13, devops...@gmail.com 
wrote:
>
> Hi Everyone,
>
> I want to report the puppet change events across nodes to a central 
> server. This should be compatible on all versions above 3.7/
>
>
> Has any one previously done this or if there is a better solution/way to 
> achieve this? 
>
> If any one can suggest a good report processor will be very helpful.
>
> Any suggestions would be appreciated.
>
> 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/7fb07558-36e4-4106-980f-3ecd1358600f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5

2017-02-14 Thread Bob
The spec appears to be here -

https://docs.puppet.com/puppet/4.9/lookup_quick.html

On Wednesday, February 8, 2017 at 8:37:32 AM UTC+13, Joshua Schaeffer wrote:
>
> Okay I see that they are actually preparing to release Puppet 4.9.2 which 
> is supposed to fix these issues. Does this mean they will release a new 
> puppet-agent package part of the PC1? Where can I go to track the progress 
> of this minor release?
>
>>

-- 
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/54a884c0-977e-4548-8d3a-89240173f8d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Why do my SERVER certs get revoked?

2017-02-14 Thread Dayton Jones
I'm intermittently getting 
 Warning: SSL_connect returned=1 errno=0 state=SSLv3 read server 
certificate B: certificate verify failed: [certificate revoked for 
/CN=my.puppet.master] 

when clients try to connect...this is very random and could go months 
without the error, but I've got it several times in the last 3 days.  The 
"fix" is stop the puppetmaster, remove it's certs/regen and restart 
puppetmaster and then have the clients reattempt the connection...

But WHY is the cert getting revoked?  What can I look at to see why this 
happens, I've checked the logs but don't see anything that sticks out... 
 Server/clients are all synced and agree on the time, DNS is working 
properly... any pointers would be greatly appreciated.

-- 
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/0f6ae8c3-91b4-47b5-8df4-ce7e79568b45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: optimize my configuration

2017-02-14 Thread jcbollinger


On Monday, February 13, 2017 at 10:51:42 AM UTC-6, puppetstan wrote:
>
> thanks for your answer
>
> But with this conf, my package package-5.0.el6.noarch.rpm is automatically 
> downloaded even if my package version is 5.0. So it's my problem. I don't 
> want downloaded package package-5.0.el6.noarch.rpm if my version package is 
> 5.0...
>
> file { "/tmp/package-5.0.el6.noarch.rpm":
> #ensure => 'present',
>source => "puppet:///modules/puppet/package-5.0.el6.noarch.rpm"
>   }
>
>
> package { "package":
> ensure => '5.0',
> provider => 'rpm',
> source => "/tmp/package-5.0.el6.noarch.rpm",
> require => File["/tmp/package-5.0.el6.noarch.rpm"]
> }
>
>

I strongly recommend creating a local repository for your RPMs, and using 
yum to manage packages (under Puppet direction).  The job you propose to 
have Puppet do is among yum's core behaviors.

If you insist on doing it manually, however, then you have two main choices:

   1. Accept that Puppet will maintain copies of your RPMs on each 
   machine.  Give it a place to put them where they will be persistent (i.e. 
   some place other than /tmp) -- Puppet will not download your RPMs again if 
   they are already there.
   2. Create one or more custom facts by which to convey to Puppet whether 
   the RPM(s) of interest are already installed and at the desired version.  
   Your manifests can then declare both the File resource and the Package 
   resource conditionally, based on the value of the fact.

Option (2) seems to be what you're asking for, but it is the messiest and 
most fragile alternative of all those available to you.


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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/61b9cbb1-63af-4a9a-b536-5b72ab95cb33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Language Style Guide update

2017-02-14 Thread Thomas Müller
I'm using vim with syntastic for code checks while editing.

For git hooks checks I use overcommit - a flexible git hook manager.

This is not a GUI but works great. :-)

Thomas

https://github.com/vim-syntastic/syntastic
https://github.com/brigade/overcommit

-- 
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/734c5b64-eb5d-43c9-9ad4-5551e663baac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.