[Puppet Users] Cannot reach to apt.puppetlabs.com from a specific subnet

2014-04-01 Thread Shahar Mintz
Hey,
While installing servers in new datacenter I failed to install puppet from 
the apt repo.

When curl to the server I got stalled:
root@mgmt01:~# curl http://apt.puppetlabs.com -v
* About to connect() to apt.puppetlabs.com port 80 (#0)
*   Trying 198.58.114.168... connected
 GET / HTTP/1.1
 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 
OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
 Host: apt.puppetlabs.com
 Accept: */*

..

From other locations I can reach the http repo with no problem, the subnet 
is: 212.118.227.0/24

Can someone look into it?

Thanks in advance!

-- 
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/ec5ac618-72b2-4d3e-b5c7-16a64f251c74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet class require fails depending on declaration order

2014-04-01 Thread Bruno Bieth
Hi,

I've got the following code that works as expected:

class { c1: }
class { c2: }

class c1 {
  notice +++
}

class c2 {
  require c1
  notice +++
}

But switching the declaration order of class c1 and c2:

class { c2: }
class { c1: }

class c1 {
  notice +++
}

class c2 {
  require c1
  notice +++
}

produces the following error:

Notice: Scope(Class[C1]): +++
Notice: Scope(Class[C2]): +++
Error: Duplicate declaration: Class[C1] is already declared; cannot 
redeclare at /vagrant/files/aa.pp:4 on node ubuntu1310.nestle.com
Error: Duplicate declaration: Class[C1] is already declared; cannot 
redeclare at /vagrant/files/aa.pp:4 on node ubuntu1310.nestle.com

Shouldn't puppet be declarative and insensitive to the declaration order?

Bruno

-- 
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/f2766983-529b-4fd7-a3c0-6f48efd45f25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Is ensure_resource() evil?

2014-04-01 Thread jcbollinger


On Monday, March 31, 2014 3:55:03 PM UTC-5, Henrik Lindberg wrote:

 Going forward, I think the Puppet Language should handle the situation 
 where more than one resource definition / class definition is made and 
 where the two are considered compatible (they describe the same 
 state). We are discussing solutions for this with the idea to solve 
 this during Puppet 4x. 



I'd really be interested in hearing more about that.  In particular, I'm 
interested in how one might judge whether resource declarations are 
compatible when they are not identical (after defaults, overrides, and any 
other relevant modifications are applied).  I still have yet to hear any 
approach to this problem that I like better than my constraints idea, now 
more than two years old: 
https://groups.google.com/forum/#!searchin/puppet-users/module$20compatibility$20constraints/puppet-users/Fvl0aOe4RPE/XpoI1oKpTF0J.
  
On the other hand, I haven't heard much of anything new on the topic since 
that particular thread went cold.


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/1114aab7-a739-4c6c-820f-f3aff6437344%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] advice change user group aix

2014-04-01 Thread hop
Hello.
I wantaed to ask, if is a better way to change user groups then this:

exec {process $usr:
command =chgrp . $newGroup,
path=[ /bin/, /sbin/ , /usr/bin/, /usr/sbin/ ]
}

I need to make the user move and he was only in the new group.

thx.

-- 
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/e4b7f0e7-835e-4374-9c69-cbd12b45d1c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet certification PPT-202

2014-04-01 Thread Julien Deloubes
Hello there,
i'll pass the ppt-202 exam (Puppet for sysadmins) next week.
I love the product but unfortunatly i have no profesionnal experience at 
Puppet, so passing the certification is a good way for staying up to date 
and practising the product.
I was wondering if having a real experience on concrete use cases is a 
prerequisite for the certification.
I work on the puppet learn VM but i don't know if it is sufficient to 
answer the certification questions?

Thanks for your feedback.

-- 
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/3ff1f66a-c7da-4661-822c-5f2eac16ffaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Is ensure_resource() evil?

2014-04-01 Thread jcbollinger


On Monday, March 31, 2014 1:08:25 PM UTC-5, Dan Bode wrote:


 That being said, there are two reasons it may be problematic.

 1. Behavior depends on parse order - this is probably the best reason not 
 to use it.



And that is indeed an excellent reason not to use it.

 

 The behavior of how it will fail depends on the order in which code is 
 parsed in Puppet. That is why this method (as well as defined(), and 
 resource collection overrides) should only be used by users who understand 
 this behavior, it's limitations, and how to debug it when they run into 
 issues. It's usage and the fact that it depends on the order in which your 
 code is parsed makes it problematic to have in modules that are intended to 
 be shared.



So ensure_resource() appears to be a solution to module compatibility 
issues, and sometimes is purported to be such, yet in practice it is 
problematic to use it for that purpose.  Let me expand a bit on 
problematic:

   - Ensure_resource() is only reliable for avoiding duplicate declaration 
   of a given resource if every declaration of that resource anywhere in the 
   manifest set is via ensure_resource().  It clashes with ordinary resource 
   declarations and also with declarations via create_resources().
   - The details of a resource declared via ensure_resource() are stable 
   and predictable only if *all* declarations of that resource (via 
   ensure_resource() and/or any other means) are consistent.
   - When working as designed, ensure_resource() actively suppresses any 
   diagnostic information Puppet might otherwise emit regarding the existence 
   of a real or potential compatibility issue.

Now consider: is it wise to duplicate resource details at several places 
throughout a manifest set, and to undertake the maintenance burden of 
keeping them all synchronized, especially when you cannot rely on any 
signal other than possible (but not certain) misconfiguration of your 
production systems should you fail to meet your maintenance requirements?  
Do you really want to risk sudden failure of a Puppet-managed system 
triggered by modification of the manifests for something completely 
unrelated?

Ensure_resource() is intended to ease construction and maintenance of 
complex manifest sets, especially those involving many modules, but using 
it safely is actually more work than avoiding it.  Moreover, if you use 
ensure_resource() in a shared module, then you saddle all users of the 
module with those maintenance issues -- usually unbeknownst to them.

And here's the icing on the cake: the ensure_resource() function creates 
more work for me simply by existing.  If I want to avoid all of the 
maintenance issues it presents then I need to audit every third-party 
module I use.  Without it I may still need to modify third-party modules, 
but Puppet will *tell me* when I need to do so.  If nothing else does so, 
then that puts ensure_resource() over the top into the evil category.

In case it was not clear, this is not about unintended uses of 
ensure_resource(); it is about the function's core use case.  The whole 
concept of the function is wrongheaded.  If you don't like evil then 
choose another adjective that suits you better, but whatever you do, DO NOT 
USE ensure_resource().


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/433cf9ec-b3e6-42c9-aaac-a35bb5025576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Incomplete file copy to Windows agent

2014-04-01 Thread Nick Miller
Hi All,

I'm trying to use puppet to manage some application servers.  I'm having an 
issue that I can't seem to figure out.  Binary files that I copy to the 
Windows host are incomplete, and if I run puppet agent -t several times the 
file usually comes through.  I'm testing this with single file I'm copying 
to the server.

 file{'MyApp1':
ensure  = file,
path= 'C:\\AppDir\\MyApp1.exe',
source  = 
[puppet:///modules/my_app_exe/MyApp1.exe],
source_permissions  = ignore,
}

The size of the file is about 3MB, but when it copies across it's anywhere 
from 80KB to 1MB.  There's no errors except when it fails trying to backup 
the file if I replace it.  If I set backup = false, it claims to complete 
successfully, but the file is still incomplete.

The error I get is:

Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
SSL_read:: internal error
Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
SSL_read:: internal error
Error: /Stage[main]/my_app_exe/File[MyApp.exe]/content: change from 
{md5}70b4a1616d5fe2f41a4ad8e3dd345fcf to 
{md5}1bb8e1e2d39b21ff2f99920760c9eb74 failed: Could not back up 
C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read::internal error

Has anyone seen this before?  It seems to happen to every Windows agent I 
have, and it's intermittent. 

Thanks,
Nick

-- 
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/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Cannot reach to apt.puppetlabs.com from a specific subnet

2014-04-01 Thread Kurt Wall
Sounds like a local configuration issue, not a Puppet problem.

On Tue, Apr 1, 2014 at 4:11 AM, Shahar Mintz shahar.mintz...@gmail.com wrote:
 Hey,
 While installing servers in new datacenter I failed to install puppet from
 the apt repo.

 When curl to the server I got stalled:
 root@mgmt01:~# curl http://apt.puppetlabs.com -v
 * About to connect() to apt.puppetlabs.com port 80 (#0)
 *   Trying 198.58.114.168... connected
 GET / HTTP/1.1
 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
 Host: apt.puppetlabs.com
 Accept: */*

 ..

 From other locations I can reach the http repo with no problem, the subnet
 is: 212.118.227.0/24

 Can someone look into it?

 Thanks in advance!

 --
 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/ec5ac618-72b2-4d3e-b5c7-16a64f251c74%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/CADJx5Nm9f8pkcLcNi6rZgfq4JmOmFD1ReXcnCFV7jJV%2BDyn8Kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Matthew Burgess
Hi folks,

In my common.yaml file I have the following hiera hashes:

system::packages:
sshd:
ensure: 'present'
...
...
more stuff here
...
system::packages:
ntpd:
ensure: 'present'

I naively assumed that Hiera would merge those 2 hashes together, just as
it does if they were present in different layers of the hierarchy.  It
appears, though, that the latter simply overrides the former;  I have an
sshd service with a dependency on the sshd  package, but with the above
hiera data, the catalog fails to compile as the sshd package isn't in the
catalog.

Am I just missing some YAML syntax to stop the hash from being overwritten,
or am I perhaps misunderstanding the behaviour I'm seeing here? I did test
manually merging the hashes in the YAML file and that did indeed 'fix' the
problem.

If that behaviour is simply a fact of life, that's fine too; I'll fix the
data up, although there was an aesthetic/organisational reason for having
it structured as it is currently.

Thanks,

Matt.

-- 
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/CAKUTv3%2BDODmoGaO2rW%3D5DKUFFedZ-R8RgeXkAZFGZNqWGsXWWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Felix Frank
Hi,

long story short: This is what the hiera_hash() function is for (as
opposed to hiera()).

HTH,
Felix

On 04/01/2014 06:15 PM, Matthew Burgess wrote:
 Hi folks,
 
 In my common.yaml file I have the following hiera hashes:
 
 system::packages:
 sshd:
 ensure: 'present'
 ...
 ...
 more stuff here
 ...
 system::packages:
 ntpd:
 ensure: 'present'
 
 I naively assumed that Hiera would merge those 2 hashes together, just
 as it does if they were present in different layers of the hierarchy. 
 It appears, though, that the latter simply overrides the former;  I have
 an sshd service with a dependency on the sshd  package, but with the
 above hiera data, the catalog fails to compile as the sshd package isn't
 in the catalog.
 
 Am I just missing some YAML syntax to stop the hash from being
 overwritten, or am I perhaps misunderstanding the behaviour I'm seeing
 here? I did test manually merging the hashes in the YAML file and that
 did indeed 'fix' the problem.
 
 If that behaviour is simply a fact of life, that's fine too; I'll fix
 the data up, although there was an aesthetic/organisational reason for
 having it structured as it is currently.
 
 Thanks,
 
 Matt.

-- 
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/533AE688.3070702%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Matthew Burgess
Thanks Felix.

I'm using the system module (https://forge.puppetlabs.com/erwbgy/system)
and the system::packages module *is* using hiera_hash() (
https://github.com/erwbgy/puppet-system/blob/master/manifests/packages.pp)
(as is system::services which is also causing me the same problem).

I assume hiera_hash()'s behaviour is default, i.e. I don't need to set
:merge_behaviour in hiera.yaml?

In addition, running 'hiera' to debug this shows the same behaviour; I
assume there isn't a native hiera equivalent to Puppet's hiera_hash()
function?

Cheers,

Matt.


On 1 April 2014 17:17, Felix Frank felix.fr...@alumni.tu-berlin.de wrote:

 Hi,

 long story short: This is what the hiera_hash() function is for (as
 opposed to hiera()).

 HTH,
 Felix

 On 04/01/2014 06:15 PM, Matthew Burgess wrote:
  Hi folks,
 
  In my common.yaml file I have the following hiera hashes:
 
  system::packages:
  sshd:
  ensure: 'present'
  ...
  ...
  more stuff here
  ...
  system::packages:
  ntpd:
  ensure: 'present'
 
  I naively assumed that Hiera would merge those 2 hashes together, just
  as it does if they were present in different layers of the hierarchy.
  It appears, though, that the latter simply overrides the former;  I have
  an sshd service with a dependency on the sshd  package, but with the
  above hiera data, the catalog fails to compile as the sshd package isn't
  in the catalog.
 
  Am I just missing some YAML syntax to stop the hash from being
  overwritten, or am I perhaps misunderstanding the behaviour I'm seeing
  here? I did test manually merging the hashes in the YAML file and that
  did indeed 'fix' the problem.
 
  If that behaviour is simply a fact of life, that's fine too; I'll fix
  the data up, although there was an aesthetic/organisational reason for
  having it structured as it is currently.
 
  Thanks,
 
  Matt.

 --
 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/533AE688.3070702%40alumni.tu-berlin.de
 .
 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/CAKUTv3KDQA%3Dnw9vRnL6DL5dFujJ_s5pdQCKdmKJ7FmK9Hkk_GA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: [Puppet Users] Incomplete file copy to Windows agent

2014-04-01 Thread Arpin Dominique (Nter)
Hi,

Did you configure a filebucket?

filebucket { 'main':
  server = 'fqdn_server',
  path   = false,
}

Dominique Arpin
Tél. Interne: 140-4156
Tél. 514 285.2929 Poste: 140-4156


De : puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] De la 
part de Nick Miller
Envoyé : 1 avril, 2014 12:11
À : puppet-users@googlegroups.com
Objet : [Puppet Users] Incomplete file copy to Windows agent

Hi All,

I'm trying to use puppet to manage some application servers.  I'm having an 
issue that I can't seem to figure out.  Binary files that I copy to the Windows 
host are incomplete, and if I run puppet agent -t several times the file 
usually comes through.  I'm testing this with single file I'm copying to the 
server.

 file{'MyApp1':
ensure  = file,
path= 'C:\\AppDir\\MyApp1.exe',
source  = 
[puppet:///modules/my_app_exe/MyApp1.exe],
source_permissions  = ignore,
}

The size of the file is about 3MB, but when it copies across it's anywhere from 
80KB to 1MB.  There's no errors except when it fails trying to backup the file 
if I replace it.  If I set backup = false, it claims to complete successfully, 
but the file is still incomplete.

The error I get is:

Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read:: 
internal error
Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read:: 
internal error
Error: /Stage[main]/my_app_exe/File[MyApp.exe]/content: change from 
{md5}70b4a1616d5fe2f41a4ad8e3dd345fcf to {md5}1bb8e1e2d39b21ff2f99920760c9eb74 
failed: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
SSL_read::internal error

Has anyone seen this before?  It seems to happen to every Windows agent I have, 
and it's intermittent.

Thanks,
Nick
--
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.commailto:puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.com?utm_medium=emailutm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Mise en garde concernant la confidentialité : Le présent message, comprenant 
tout fichier qui y est joint, est envoyé à l'intention exclusive de son 
destinataire; il est de nature confidentielle et peut constituer une 
information protégée par le secret professionnel. Si vous n'êtes pas le 
destinataire, nous vous avisons que toute impression, copie, distribution ou 
autre utilisation de ce message est strictement interdite. Si vous avez reçu ce 
courriel par erreur, veuillez en aviser immédiatement l'expéditeur par retour 
de courriel et supprimer le courriel. Merci!

Confidentiality Warning: This message, including any attachment, is sent only 
for the use of the intended recipient; it is confidential and may constitute 
privileged information. If you are not the intended recipient, you are hereby 
notified that any printing, copying, distribution or other use of this message 
is strictly prohibited. If you have received this email in error, please notify 
the sender immediately by return email, and delete it. Thank you!

-- 
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/C2F62CDF5915D0458F0528664315BAE746E894C1%40MTL1EXC02.scqmtl.loto-quebec.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Matthew Burgess
Apologies for that last email; hiera_hash() is obviously doing *nearly* the
right thing, as it *does* merge hashes across different levels of the
hierarchy.  It *doesn't* seem to be merging hashes within the same level of
the hierarchy.

Thanks,

Matt.


On 1 April 2014 17:35, Matthew Burgess matthew.2.burg...@gmail.com wrote:

 Thanks Felix.

 I'm using the system module (https://forge.puppetlabs.com/erwbgy/system)
 and the system::packages module *is* using hiera_hash() (
 https://github.com/erwbgy/puppet-system/blob/master/manifests/packages.pp)
 (as is system::services which is also causing me the same problem).

 I assume hiera_hash()'s behaviour is default, i.e. I don't need to set
 :merge_behaviour in hiera.yaml?

 In addition, running 'hiera' to debug this shows the same behaviour; I
 assume there isn't a native hiera equivalent to Puppet's hiera_hash()
 function?

 Cheers,

 Matt.


 On 1 April 2014 17:17, Felix Frank felix.fr...@alumni.tu-berlin.dewrote:

 Hi,

 long story short: This is what the hiera_hash() function is for (as
 opposed to hiera()).

 HTH,
 Felix

 On 04/01/2014 06:15 PM, Matthew Burgess wrote:
  Hi folks,
 
  In my common.yaml file I have the following hiera hashes:
 
  system::packages:
  sshd:
  ensure: 'present'
  ...
  ...
  more stuff here
  ...
  system::packages:
  ntpd:
  ensure: 'present'
 
  I naively assumed that Hiera would merge those 2 hashes together, just
  as it does if they were present in different layers of the hierarchy.
  It appears, though, that the latter simply overrides the former;  I have
  an sshd service with a dependency on the sshd  package, but with the
  above hiera data, the catalog fails to compile as the sshd package isn't
  in the catalog.
 
  Am I just missing some YAML syntax to stop the hash from being
  overwritten, or am I perhaps misunderstanding the behaviour I'm seeing
  here? I did test manually merging the hashes in the YAML file and that
  did indeed 'fix' the problem.
 
  If that behaviour is simply a fact of life, that's fine too; I'll fix
  the data up, although there was an aesthetic/organisational reason for
  having it structured as it is currently.
 
  Thanks,
 
  Matt.

 --
 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/533AE688.3070702%40alumni.tu-berlin.de
 .
 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/CAKUTv3JLCw_FWJTnf8ZCJ_RtWuLKvwG6afa5oECxB1R%3DxKdjHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Felix Frank
Hmm, so you have the same key multiple times in one yaml file? Why?

On 04/01/2014 06:51 PM, Matthew Burgess wrote:
 Apologies for that last email; hiera_hash() is obviously doing *nearly*
 the right thing, as it *does* merge hashes across different levels of
 the hierarchy.  It *doesn't* seem to be merging hashes within the same
 level of the hierarchy.
 
 Thanks,
 
 Matt.

-- 
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/533AF084.9030509%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Robin Bowes
I suspect duplicate keys are not valid YAML.

R.
On 1 Apr 2014 17:51, Matthew Burgess matthew.2.burg...@gmail.com wrote:

 Apologies for that last email; hiera_hash() is obviously doing *nearly*
 the right thing, as it *does* merge hashes across different levels of the
 hierarchy.  It *doesn't* seem to be merging hashes within the same level of
 the hierarchy.

 Thanks,

 Matt.


 On 1 April 2014 17:35, Matthew Burgess matthew.2.burg...@gmail.comwrote:

 Thanks Felix.

 I'm using the system module (https://forge.puppetlabs.com/erwbgy/system)
 and the system::packages module *is* using hiera_hash() (
 https://github.com/erwbgy/puppet-system/blob/master/manifests/packages.pp)
 (as is system::services which is also causing me the same problem).

 I assume hiera_hash()'s behaviour is default, i.e. I don't need to set
 :merge_behaviour in hiera.yaml?

 In addition, running 'hiera' to debug this shows the same behaviour; I
 assume there isn't a native hiera equivalent to Puppet's hiera_hash()
 function?

 Cheers,

 Matt.


 On 1 April 2014 17:17, Felix Frank felix.fr...@alumni.tu-berlin.dewrote:

 Hi,

 long story short: This is what the hiera_hash() function is for (as
 opposed to hiera()).

 HTH,
 Felix

 On 04/01/2014 06:15 PM, Matthew Burgess wrote:
  Hi folks,
 
  In my common.yaml file I have the following hiera hashes:
 
  system::packages:
  sshd:
  ensure: 'present'
  ...
  ...
  more stuff here
  ...
  system::packages:
  ntpd:
  ensure: 'present'
 
  I naively assumed that Hiera would merge those 2 hashes together, just
  as it does if they were present in different layers of the hierarchy.
  It appears, though, that the latter simply overrides the former;  I
 have
  an sshd service with a dependency on the sshd  package, but with the
  above hiera data, the catalog fails to compile as the sshd package
 isn't
  in the catalog.
 
  Am I just missing some YAML syntax to stop the hash from being
  overwritten, or am I perhaps misunderstanding the behaviour I'm seeing
  here? I did test manually merging the hashes in the YAML file and that
  did indeed 'fix' the problem.
 
  If that behaviour is simply a fact of life, that's fine too; I'll fix
  the data up, although there was an aesthetic/organisational reason for
  having it structured as it is currently.
 
  Thanks,
 
  Matt.

 --
 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/533AE688.3070702%40alumni.tu-berlin.de
 .
 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/CAKUTv3JLCw_FWJTnf8ZCJ_RtWuLKvwG6afa5oECxB1R%3DxKdjHQ%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CAKUTv3JLCw_FWJTnf8ZCJ_RtWuLKvwG6afa5oECxB1R%3DxKdjHQ%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 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/CAJGKfwDhE7t-0qK9TpDHrZ6j_ePM6_%2BwK-K%2BUFfBRw0C3qJdow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Duplicate hiera hashes in the same data source override instead of merge

2014-04-01 Thread Matthew Burgess
Like I said, it was purely for cosmetic/aesthetic purposes; I wanted to
write the YAML file in the same order as things were defined in our design
document so that it was easier to review that the implementation matched
the design.  Section 1 of that doc might cover something like NTP
configuraiton, which requires a package, config file and service; Section 2
might cover sshd, again with another package, config file and service.  As
it doesn't look like having multiple keys with the same name in the same
file is supported, I'll get over my obsession with trying to lay the file
out to match the order things appear in the design :-)

Perhaps I need to look at this another way; I could lay my tests out (I'm
sure I have some somewhere!) in the same order as the design doc, then I
get the implementation review for free by executing the tests!

Thanks for your help,

Matt.


On 1 April 2014 17:59, Felix Frank felix.fr...@alumni.tu-berlin.de wrote:

 Hmm, so you have the same key multiple times in one yaml file? Why?

 On 04/01/2014 06:51 PM, Matthew Burgess wrote:
  Apologies for that last email; hiera_hash() is obviously doing *nearly*
  the right thing, as it *does* merge hashes across different levels of
  the hierarchy.  It *doesn't* seem to be merging hashes within the same
  level of the hierarchy.
 
  Thanks,
 
  Matt.

 --
 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/533AF084.9030509%40alumni.tu-berlin.de
 .
 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/CAKUTv3K9mgAMWKS13XwqGzid3CDVQoKxUdY3Ugyp0FvHS%2BJW-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Incomplete file copy to Windows agent

2014-04-01 Thread Nick Miller
No, I'm just using the 'files' directory within the module.  What would the 
filebucket be used for in this situation? 

On Tuesday, April 1, 2014 12:47:45 PM UTC-4, Arpin Dominique (Nter) wrote:

  Hi,

  

 Did you configure a filebucket?

  

 filebucket { 'main':

   server = 'fqdn_server',

   path   = false,

 }

  
  
 *Dominique Arpin* 
  
 Tél. Interne: 140-4156
  
 Tél. 514 285.2929 Poste: 140-4156


  *De :* puppet...@googlegroups.com javascript: [mailto:
 puppet...@googlegroups.com javascript:] *De la part de* Nick Miller
 *Envoyé :* 1 avril, 2014 12:11
 *À :* puppet...@googlegroups.com javascript:
 *Objet :* [Puppet Users] Incomplete file copy to Windows agent

  
  
 Hi All,
  
  
  
 I'm trying to use puppet to manage some application servers.  I'm having 
 an issue that I can't seem to figure out.  Binary files that I copy to the 
 Windows host are incomplete, and if I run puppet agent -t several times the 
 file usually comes through.  I'm testing this with single file I'm copying 
 to the server.
  
  
   
  file{'MyApp1':
  
 ensure  = file,
  
 path= 'C:\\AppDir\\MyApp1.exe',
  
 source  = 
 [puppet:///modules/my_app_exe/MyApp1.exe],
  
 source_permissions  = ignore,
  
 }
   
  
  
 The size of the file is about 3MB, but when it copies across it's anywhere 
 from 80KB to 1MB.  There's no errors except when it fails trying to backup 
 the file if I replace it.  If I set backup = false, it claims to complete 
 successfully, but the file is still incomplete.
  
  
  
 The error I get is:
  
  
   
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: /Stage[main]/my_app_exe/File[MyApp.exe]/content: change from 
 {md5}70b4a1616d5fe2f41a4ad8e3dd345fcf to 
 {md5}1bb8e1e2d39b21ff2f99920760c9eb74 failed: Could not back up 
 C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read::internal error
   
  
  
 Has anyone seen this before?  It seems to happen to every Windows agent I 
 have, and it's intermittent. 
  
  
  
 Thanks,
  
 Nick
  
 -- 
 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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.
  
 Mise en garde concernant la confidentialité : Le présent message, 
 comprenant tout fichier qui y est joint, est envoyé à l'intention exclusive 
 de son destinataire; il est de nature confidentielle et peut constituer une 
 information protégée par le secret professionnel. Si vous n'êtes pas le 
 destinataire, nous vous avisons que toute impression, copie, distribution 
 ou autre utilisation de ce message est strictement interdite. Si vous avez 
 reçu ce courriel par erreur, veuillez en aviser immédiatement l'expéditeur 
 par retour de courriel et supprimer le courriel. Merci! 

 Confidentiality Warning: This message, including any attachment, is sent 
 only for the use of the intended recipient; it is confidential and may 
 constitute privileged information. If you are not the intended recipient, 
 you are hereby notified that any printing, copying, distribution or other 
 use of this message is strictly prohibited. If you have received this email 
 in error, please notify the sender immediately by return email, and delete 
 it. Thank you! 
  

-- 
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/88d45620-6c19-4a89-9cee-45aa8bab3119%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Incomplete file copy to Windows agent

2014-04-01 Thread Nick Miller
Sorry, brain-fart.  Yes, I do have the filebucked configured, and it 
appears to be correct.

On Tuesday, April 1, 2014 1:23:24 PM UTC-4, Nick Miller wrote:

 No, I'm just using the 'files' directory within the module.  What would 
 the filebucket be used for in this situation? 

 On Tuesday, April 1, 2014 12:47:45 PM UTC-4, Arpin Dominique (Nter) wrote:

  Hi,

  

 Did you configure a filebucket?

  

 filebucket { 'main':

   server = 'fqdn_server',

   path   = false,

 }

  
  
 *Dominique Arpin* 
  
 Tél. Interne: 140-4156
  
 Tél. 514 285.2929 Poste: 140-4156


  *De :* puppet...@googlegroups.com [mailto:puppet...@googlegroups.com] *De 
 la part de* Nick Miller
 *Envoyé :* 1 avril, 2014 12:11
 *À :* puppet...@googlegroups.com
 *Objet :* [Puppet Users] Incomplete file copy to Windows agent

  
  
 Hi All,
  
  
  
 I'm trying to use puppet to manage some application servers.  I'm having 
 an issue that I can't seem to figure out.  Binary files that I copy to the 
 Windows host are incomplete, and if I run puppet agent -t several times the 
 file usually comes through.  I'm testing this with single file I'm copying 
 to the server.
  
  
   
  file{'MyApp1':
  
 ensure  = file,
  
 path= 'C:\\AppDir\\MyApp1.exe',
  
 source  = 
 [puppet:///modules/my_app_exe/MyApp1.exe],
  
 source_permissions  = ignore,
  
 }
   
  
  
 The size of the file is about 3MB, but when it copies across it's 
 anywhere from 80KB to 1MB.  There's no errors except when it fails trying 
 to backup the file if I replace it.  If I set backup = false, it claims to 
 complete successfully, but the file is still incomplete.
  
  
  
 The error I get is:
  
  
   
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: /Stage[main]/my_app_exe/File[MyApp.exe]/content: change from 
 {md5}70b4a1616d5fe2f41a4ad8e3dd345fcf to 
 {md5}1bb8e1e2d39b21ff2f99920760c9eb74 failed: Could not back up 
 C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read::internal error
   
  
  
 Has anyone seen this before?  It seems to happen to every Windows agent I 
 have, and it's intermittent. 
  
  
  
 Thanks,
  
 Nick
  
 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.
  
 Mise en garde concernant la confidentialité : Le présent message, 
 comprenant tout fichier qui y est joint, est envoyé à l'intention exclusive 
 de son destinataire; il est de nature confidentielle et peut constituer une 
 information protégée par le secret professionnel. Si vous n'êtes pas le 
 destinataire, nous vous avisons que toute impression, copie, distribution 
 ou autre utilisation de ce message est strictement interdite. Si vous avez 
 reçu ce courriel par erreur, veuillez en aviser immédiatement l'expéditeur 
 par retour de courriel et supprimer le courriel. Merci! 

 Confidentiality Warning: This message, including any attachment, is sent 
 only for the use of the intended recipient; it is confidential and may 
 constitute privileged information. If you are not the intended recipient, 
 you are hereby notified that any printing, copying, distribution or other 
 use of this message is strictly prohibited. If you have received this email 
 in error, please notify the sender immediately by return email, and delete 
 it. Thank you! 
  


-- 
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/791e4875-763a-4278-8573-7fe71357b129%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread linuxhpceng
  Hello all, thanx in advance for listening to my sniffles as I am failing 
at solving this problem.

  I have CloudFormation template that builds out some servers.  I have 
parameterized a few values like. DatabseName DataBaseUser DataBaseLocation 
and some others.  The problem I seem to be faced with is getting these 
values to puppet to perform the correct configuration steps.  I had a 
pretty good idea about how I could accomplish this, and then someone 
introduced .yaml files as part of hiera..  While I am not that impressed 
with hiera, it seems to introduce a-lot of static environment files to 
manage.  This is not a road our team wants to travel down.  If I am wrong 
about this I am certainly open to enlightenment, but from what I have read 
and witnessed, it's static.

 So here I am, I have this CF template that asks for parameters that I need 
puppet to use for configuration.  Does anyone have any suggestions as I 
read on through all this documentation?


 Thanks,

J

-- 
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/7d2b3b5a-87b5-4078-bff1-ab3e0ed49388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread Nathan Valentine
Hiera allows multiple backends, YAML being one and also being the one
with which most people start, some of which can be non-static. If you
Google for Craig Dunn's blog you'll see an example where he uses a
backend which enables Hiera data retrieval from a CouchDB backend.
That particular example is one of my favorites examples of the
flexibility of Hiera.

As to how to get CF data into Puppet, I've not used CF enough to
venture a solid guess but the first thing I would do is look to see if
someone has a Forge module which presents user data as facter
variables. In the case of AWS/EC2 facts this is done, if memory
serves, via a Type and Provider that queries the 169.x node metadata
service embedded in AWS/EC2.

Feel free to let me know how that goes via direct email. I rarely have
time to keep up with the mailing list.

Cheers.



On Tue, Apr 1, 2014 at 1:09 PM,  linuxhpc...@gmail.com wrote:
   Hello all, thanx in advance for listening to my sniffles as I am failing
 at solving this problem.

   I have CloudFormation template that builds out some servers.  I have
 parameterized a few values like. DatabseName DataBaseUser DataBaseLocation
 and some others.  The problem I seem to be faced with is getting these
 values to puppet to perform the correct configuration steps.  I had a pretty
 good idea about how I could accomplish this, and then someone introduced
 .yaml files as part of hiera..  While I am not that impressed with hiera, it
 seems to introduce a-lot of static environment files to manage.  This is not
 a road our team wants to travel down.  If I am wrong about this I am
 certainly open to enlightenment, but from what I have read and witnessed,
 it's static.

  So here I am, I have this CF template that asks for parameters that I need
 puppet to use for configuration.  Does anyone have any suggestions as I read
 on through all this documentation?


  Thanks,

 J

 --
 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/7d2b3b5a-87b5-4078-bff1-ab3e0ed49388%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
---
Nathan Valentine, Puppet Labs Professional Services

Join us at PuppetConf 2014, September 23-24 in San Francisco -
http://puppetconf.com

-- 
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%2BsYer22UaQ%2B%2BxYcsm%3DrQkaZHRuSaK9jZrs1ytPadTqQKWXB1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread Nathan Valentine
 variables. In the case of AWS/EC2 facts this is done, if memory
 serves, via a Type and Provider that queries the 169.x node metadata
 service embedded in AWS/EC2.

Sorry, perils of multitasking... s/Type and Provider that/series of
custom facts which/g.

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


Re: [Puppet Users] CloudFormation/puppet/hiera integration..

2014-04-01 Thread José Luis Ledesma
Hiera is really great, but if you have to configure diferent parameters per
host the yaml backend could be a nightmare..

Note that i  talk about the backend, you can switch it to a nosql database
( couchdb, redis) or sql( mysql) or ldap ...

Regards,
El 01/04/2014 22:26, linuxhpc...@gmail.com escribió:

   Hello all, thanx in advance for listening to my sniffles as I am failing
 at solving this problem.

   I have CloudFormation template that builds out some servers.  I have
 parameterized a few values like. DatabseName DataBaseUser DataBaseLocation
 and some others.  The problem I seem to be faced with is getting these
 values to puppet to perform the correct configuration steps.  I had a
 pretty good idea about how I could accomplish this, and then someone
 introduced .yaml files as part of hiera..  While I am not that impressed
 with hiera, it seems to introduce a-lot of static environment files to
 manage.  This is not a road our team wants to travel down.  If I am wrong
 about this I am certainly open to enlightenment, but from what I have read
 and witnessed, it's static.

  So here I am, I have this CF template that asks for parameters that I
 need puppet to use for configuration.  Does anyone have any suggestions as
 I read on through all this documentation?


  Thanks,

 J

 --
 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/7d2b3b5a-87b5-4078-bff1-ab3e0ed49388%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/7d2b3b5a-87b5-4078-bff1-ab3e0ed49388%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 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/CAF_B3dfFWJRZ2HG2y2BVNzSRcRqWRAMuHo%3D-mU%2BshGUbAmn%2BnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet certification PPT-202

2014-04-01 Thread Nathan Valentine
http://puppetlabs.com/services/certification has a pretty solid list
of pre-cert study materials but, yes, the more hands-on experience you
have with Puppet/PE the better.

Of the self-study resources mentioned there, I highly recommend:

1) The Puppet Certification Practice Test
2) The Puppet Learning Management System videos
3) The Puppet Enterprise Learning VM

The training course are also awesome but then I'm biased as I'm a trainer. ;)

Also be aware that the content for the cert test was recently
refreshed. In my opinion, and I was among the people who worked on the
new version of the test, the new version is more challenging than the
old test. I would trust the Practice Test as a gauge over the word of
anyone who might have taken the previous version of the cert.

Good luck! If you pass don't post that fact to LinkedIn until you've
upped your mobile plan as the recruiters will set your phone on fire!
;)

-- 
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%2BsYer3OtF1ORQNAAw3-3fy4bU6%3D-c5Cu0XR_n46k4MQo3EzWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Incomplete file copy to Windows agent

2014-04-01 Thread Nick Miller
I've actually figured this out.  The problem was caused by mis-configured 
DNS settings on the puppet master server.  Once fixed, I haven't been able 
to reproduce the problem.

On Tuesday, April 1, 2014 1:29:43 PM UTC-4, Nick Miller wrote:

 Sorry, brain-fart.  Yes, I do have the filebucked configured, and it 
 appears to be correct.

 On Tuesday, April 1, 2014 1:23:24 PM UTC-4, Nick Miller wrote:

 No, I'm just using the 'files' directory within the module.  What would 
 the filebucket be used for in this situation? 

 On Tuesday, April 1, 2014 12:47:45 PM UTC-4, Arpin Dominique (Nter) wrote:

  Hi,

  

 Did you configure a filebucket?

  

 filebucket { 'main':

   server = 'fqdn_server',

   path   = false,

 }

  
  
 *Dominique Arpin* 
  
 Tél. Interne: 140-4156
  
 Tél. 514 285.2929 Poste: 140-4156


  *De :* puppet...@googlegroups.com [mailto:puppet...@googlegroups.com] *De 
 la part de* Nick Miller
 *Envoyé :* 1 avril, 2014 12:11
 *À :* puppet...@googlegroups.com
 *Objet :* [Puppet Users] Incomplete file copy to Windows agent

  
  
 Hi All,
  
  
  
 I'm trying to use puppet to manage some application servers.  I'm having 
 an issue that I can't seem to figure out.  Binary files that I copy to the 
 Windows host are incomplete, and if I run puppet agent -t several times the 
 file usually comes through.  I'm testing this with single file I'm copying 
 to the server.
  
  
   
  file{'MyApp1':
  
 ensure  = file,
  
 path= 'C:\\AppDir\\MyApp1.exe',
  
 source  = 
 [puppet:///modules/my_app_exe/MyApp1.exe],
  
 source_permissions  = ignore,
  
 }
   
  
  
 The size of the file is about 3MB, but when it copies across it's 
 anywhere from 80KB to 1MB.  There's no errors except when it fails trying 
 to backup the file if I replace it.  If I set backup = false, it claims to 
 complete successfully, but the file is still incomplete.
  
  
  
 The error I get is:
  
  
   
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: Could not back up C:/AppDir/MyApp.exe: Error 400 on SERVER: 
 SSL_read:: internal error
  
 Error: /Stage[main]/my_app_exe/File[MyApp.exe]/content: change from 
 {md5}70b4a1616d5fe2f41a4ad8e3dd345fcf to 
 {md5}1bb8e1e2d39b21ff2f99920760c9eb74 failed: Could not back up 
 C:/AppDir/MyApp.exe: Error 400 on SERVER: SSL_read::internal error
   
  
  
 Has anyone seen this before?  It seems to happen to every Windows agent 
 I have, and it's intermittent. 
  
  
  
 Thanks,
  
 Nick
  
 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/363e02d7-1b84-416d-ada4-30c647cbd0a1%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.
  
 Mise en garde concernant la confidentialité : Le présent message, 
 comprenant tout fichier qui y est joint, est envoyé à l'intention exclusive 
 de son destinataire; il est de nature confidentielle et peut constituer une 
 information protégée par le secret professionnel. Si vous n'êtes pas le 
 destinataire, nous vous avisons que toute impression, copie, distribution 
 ou autre utilisation de ce message est strictement interdite. Si vous avez 
 reçu ce courriel par erreur, veuillez en aviser immédiatement l'expéditeur 
 par retour de courriel et supprimer le courriel. Merci! 

 Confidentiality Warning: This message, including any attachment, is sent 
 only for the use of the intended recipient; it is confidential and may 
 constitute privileged information. If you are not the intended recipient, 
 you are hereby notified that any printing, copying, distribution or other 
 use of this message is strictly prohibited. If you have received this email 
 in error, please notify the sender immediately by return email, and delete 
 it. Thank you! 
  


-- 
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/25efbdea-bcd2-4976-9d6b-227b5ad4dc46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Is ensure_resource() evil?

2014-04-01 Thread Henrik Lindberg

On 2014-01-04 15:22, jcbollinger wrote:



On Monday, March 31, 2014 3:55:03 PM UTC-5, Henrik Lindberg wrote:

Going forward, I think the Puppet Language should handle the situation
where more than one resource definition / class definition is made and
where the two are considered compatible (they describe the same
state). We are discussing solutions for this with the idea to solve
this during Puppet 4x.



I'd really be interested in hearing more about that.  In particular, I'm
interested in how one might judge whether resource declarations are
compatible when they are not identical (after defaults, overrides, and
any other relevant modifications are applied).  I still have yet to hear
any approach to this problem that I like better than my constraints
idea, now more than two years old:
https://groups.google.com/forum/#!searchin/puppet-users/module$20compatibility$20constraints/puppet-users/Fvl0aOe4RPE/XpoI1oKpTF0J.
On the other hand, I haven't heard much of anything new on the topic
since that particular thread went cold.

One major problem is containment, if something is declared more than 
once, and with different constraints, that needs to be recorded 
somewhere - the 3x catalog format does not lend itself easily to 
something like that. In the first cut of the 4x catalog model we added 
the idea of a proxy resource; if the same resource is required from more 
than one place, those places become proxies for the resource that has 
the aggregated constraints.


We have not yet drilled any deeper into how the constraints work, what 
is considered compatible etc.


When we get to it, there are lots of things to deal with wrt. 
containment and dependencies of the proxies (dependencies needs to also 
be joined, and may need to propagate to their containers, etc. We will 
probably start with solving those issues (with the idea that there is at 
least one set of compatibility when resources are identical which gives 
us a starting point.



- 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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/lhfbie%24cm7%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Ordering between 2 create_resources in Puppet Manifests

2014-04-01 Thread Vishwa Kumba
thank you,
  I found both your replies very useful. 


On Saturday, March 29, 2014 1:48:26 PM UTC, Vishwa Kumba wrote:

 I was wondering if there is a way to define ordering between 2 
 create_resources in puppet manifests.

 For example:

 create_resources('php::install', $php_packages)  -
 create_resources('webapps::deploy', $apps)

 The above does not work, but does puppet support the ordering between 2 
 create_sources statements?
 I need my webapps to be deployed after the required packages have been 
 installed.

 I have seen a syntax like this below. Here class['apache'] seems to be 
 execued before the create_resources here.

 include apache
 Class['apache'] - Webapps::Deploy_files | |
 create_resources('webapps::deploy_files', $apps)

 Is there any puppet documentation on this strange syntax | |? Using this 
 syntax, is it possible to call create_resources before and after a class 
 declaration?


 -Vishwa


-- 
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/7dca8eca-f2c4-4b39-89e7-38a5c91883ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Unable to use centos-510-x64 vagrant box with beaker-rspec

2014-04-01 Thread treydock
I've been switching my modules from rspec-system to beaker-rspec and am 
having some issues running any tests using the centos-510-x64 and 
centos-59-x64 puppetlabs vagrant boxes.  Every test fails to install 
ntpdate due to Temporary failure in name resolution.  I do not have this 
issue with the centos-65-x65 box.

I found that if I run my test with RS_DESTROY=no and then log into the 
centos-510-x64 box and execute 'sudo /sbin/service network restart', name 
resolution works.  The contents of /etc/resolv.conf are not updated by dhcp 
on the EL5 boxes.

Contents of /etc/resolv.conf on EL5 box:
$ cat /etc/resolv.conf
nameserver 10.16.22.10
nameserver 10.16.22.11

Contents of /etc/resolv.conf on EL5 after restarting network service:

$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search tamu.edu
nameserver 10.0.2.3

Contents of /etc/resolv.conf on EL6 box:
$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search tamu.edu
nameserver 10.0.2.3

Output from failed beaker-rspec run is at the end of the post.

Any suggestions on what can be done to remedy this or is this a bug with 
the EL5 boxes?

Thanks
- Trey

centos-510-x64 14:46:37$  which ntpdate
which: no ntpdate in 
(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)

centos-510-x64 executed in 0.01 seconds
Exited: 1

centos-510-x64 14:46:37$  yum -y  install ntpdate
Loaded plugins: fastestmirror, security
Determining fastest mirrors
Could not retrieve mirrorlist 
http://mirrorlist.centos.org/?release=5arch=x86_64repo=os error was
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Could not retrieve mirrorlist 
http://mirrorlist.centos.org/?release=5arch=x86_64repo=extras error was
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Could not retrieve mirrorlist 
http://mirrorlist.centos.org/?release=5arch=x86_64repo=updates error was
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
 * base: centos-distro.cavecreek.net
 * extras: ftp.wallawalla.edu
 * updates: mirror.nandomedia.com
http://centos-distro.cavecreek.net/centos/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://centos.mirror.nac.net/5.10/os/x86_64/repodata/repomd.xml: [Errno 4] 
IOError: urlopen error (-3, 'Temporary failure in name resolution')
Trying other mirror.
http://centos.unmeteredvps.net/5.10/os/x86_64/repodata/repomd.xml: [Errno 
4] IOError: urlopen error (-3, 'Temporary failure in name resolution')
Trying other mirror.
http://linux.mirrors.es.net/centos/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirror.dattobackup.com/CentOS/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirror.sanctuaryhost.com/centos/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors-pa.sioru.com/centos/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.adams.net/centos/5.10/os/x86_64/repodata/repomd.xml: [Errno 
4] IOError: urlopen error (-3, 'Temporary failure in name resolution')
Trying other mirror.
http://mirrors.easynews.com//linux/centos/5.10/os/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.maine.edu/CentOS/5.10/os/x86_64/repodata/repomd.xml: [Errno 
4] IOError: urlopen error (-3, 'Temporary failure in name resolution')
Trying other mirror.
ftp://ftp.wallawalla.edu/pub/mirrors/centos/5.10/extras/x86_64/repodata/repomd.xml:
 
[Errno 4] IOError: urlopen error (-2, 'Name or service not known')
Trying other mirror.
http://centos.gravityfish.com/5.10/extras/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://ftp.osuosl.org/pub/centos/5.10/extras/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.advancedhosters.com/centos/5.10/extras/x86_64/repodata/repomd.xml:
 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.einstein.yu.edu/centos/5.10/extras/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.loosefoot.com/centos/5.10/extras/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: urlopen error (-3, 'Temporary failure in name 
resolution')
Trying other mirror.
http://mirrors.maine.edu/CentOS/5.10/extras/x86_64/repodata/repomd.xml: 
[Errno 4] IOError: 

[Puppet Users] beaker-rspec failing to test resources with should_not matcher

2014-04-01 Thread treydock
This MAY be a bug with serverspec or specinfra gems, but I was hoping 
someone here could help me identify the problem.  I wrote some tests that 
ensure file resources are removed and yumrepo resources are disabled.  I 
was using older beaker gem and recently updated to latest 1.9.1 to find 
that my should_not matchers all fail. 

  describe yumrepo('centos-scl') do
it { should exist }
it { should_not be_enabled }
  end

centos-65-x64 17:29:19$  yum repolist all -C | grep ^centos-scl | grep 
enabled

centos-65-x64 executed in 0.14 seconds
Exited: 1
  should not be enabled (FAILED - 4)
  should not be enabled (FAILED - 4)


  4) repo_centos class default parameters Yumrepo centos-scl should not 
be enabled
 Failure/Error: it { should_not be_enabled }
   yum repolist all -C | grep ^centos-scl | grep enabled
   expected Yumrepo centos-scl not to be enabled

The same false failure occurs for file with should_not be_file matcher.

describe file('/etc/yum.repos.d/CentOS-Base.repo') do
  it { should_not be_file }
end

  6) repo_centos class default parameters File 
/etc/yum.repos.d/CentOS-Base.repo should not be file
 Failure/Error: it { should_not be_file }
   test -f /etc/yum.repos.d/CentOS-Base.repo
   expected file? to return false, got 
#SpecInfra::CommandResult:0x10eff4498 @stderr=, @stdout=, 
@exit_signal=nil, @exit_status=1
 # ./spec/acceptance/01_repo_centos_spec.rb:56

The module I'm working on is at https://github.com/treydock/repo_centos.

Thanks
- Trey

-- 
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/5d9ef6d6-f753-42c4-bede-bb3c1544212e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Facter 2.0.1

2014-04-01 Thread Eric Sorenson
Released April 1, 2014. (RC1: February 28; RC2: March 12; RC3: March 25; RC4: 
March 28.)

Facter 2.0.1 is the first release in the Facter 2 series. 

Headline Features
- Fact values can now be arbitrarily complex data structures instead of simple 
strings.
- There's a new API for adding facts, which enables structured facts and allows 
fact values to be built up across multiple 'chunks' of code. (see 
http://docs.puppetlabs.com/facter/2.0/fact_overview.html for the full details )

Additional Changes
- There are some backwards-incompatible changes to fact resolutions which were 
queued up for a major semver bump.
- Code that was deprecated in the Facter 1.x series is now gone, both internal 
code as well as some facts ('ldapname', 'memorytotal', 'selinux_mode')
- Facter no longer supports Ruby 1.8.5.

See the full release notes here: 
http://docs.puppetlabs.com/facter/2.0/release_notes.html
Get Facter 2 by following the instructions here (but install the Facter package 
instead of Puppet): http://docs.puppetlabs.com/guides/installation.html


Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
puppet platform // coffee // techno // bicycles

-- 
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/98A571EF-7E6F-4247-9AB0-3206538268DA%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs-apache and WSGI socket location

2014-04-01 Thread Adam Clark
Hi all,
  I am trying to work out the best way to solve something that does not get 
configured correctly with puppetlabs-apache.

using puppetlabs-apache and WSGI defaults, it places the wsgi socket into 
the default location according to:
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix

Which is $logroot /var/log/httpd in the case for CentOS.

$logroot is not handled specifically by the module and gets installed via 
the RPM
[root@api02 ~]# rpm -qpl httpd-2.2.15-29.el6.centos.x86_64.rpm  | grep 
/var/log
/var/log/httpd

with the following perms:
[openstack@api02 ~]# ls -al /var/log/httpd
total 8
drwx--. 2 root   root 4096 Apr  2 14:46 .
drwxr-xr-x. 8 root   root 4096 Apr  2 14:46 ..
srwx--. 1 apache root0 Apr  2 14:46 wsgi.11431.0.1.sock

Other httpd processes run as the user $user (apache) and thus get access 
denied to the socket, or rather the directory containing the socket.
(13)Permission denied: mod_wsgi (pid=11435): Unable to connect to WSGI 
daemon process 'keystone' on '/etc/httpd/logs/wsgi.11431.0.1.sock' after 
multiple attempts.

This also seems to be specific to RedHat as Ubuntu seems to handle this ok, 
but it is not in the defaults as outlined in the official doco:
openstack@api04:~$ ls -al /run/apache2
total 0
drwxr-xr-x  2 root root  80 Apr  2 10:53 .
drwxr-xr-x 16 root root 620 Apr  2 15:07 ..
srwx--  1 www-data root   0 Apr  2 10:53 cgisock.1078
srwx--  1 www-data root   0 Apr  2 10:53 wsgi.1078.0.1.sock

This is the defaults as there is nothing in 
the /etc/apache2/mods-available/wsgi.conf file explicitly for the socket 
location.  They must use a different compile time option.

So I don't need to fix Ubuntu.

Another annoying thing is that the location seems to be hard coded in, 
because if you change $logroot, it still seems to place the socket in 
/var/log/httpd, and all logs go elsewhere.

What is the best way to handle this?  Here is some possibilities:
1. In in ::apache::mod::wsgi create new defaults for the WSGISocketPrefix 
and move it to something like /var/run/wgsi; this is the most complete way 
as changes to $logroot will not leave the socket high and dry
2. Assuming that /var/log/httpd will always be there via the RPM, change 
owner directly in init.pp

Given that Ubuntu needs no changes I am looking for something that has the 
least impact to the puppetlabs-apache module.

Option 2 seems to fit the bill and only requires the following in init.pp: 
  if $osfamily == RedHat {
# Set correct ownership for default WSGI socket location
file { '/var/log/httpd':
  ensure  = directory,
  owner   = $user,
  require = Package['httpd'],
}
  }

Thoughts?

My commit is located here:
https://github.com/clarkadamp/puppetlabs-apache/compare/puppetlabs:master...master


Adam

-- 
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/a018184e-66d6-460f-a1ae-c74151945a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.