[Puppet Users] How to get agents ip address in master manifest file

2014-08-13 Thread Malintha Adikari
Hi,

I have a requirement to get the value of the ip address which send the 
request for the catalog for the master in one of my manifest file. How can 
i retrieve it inside master manifest file ?

Regards,
Malintha

-- 
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/59503936-1071-4c2d-854b-496e635c364f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How to get agents ip address in master manifest file

2014-08-13 Thread Paul Tötterman


 I have a requirement to get the value of the ip address which send the 
 request for the catalog for the master in one of my manifest file. How can 
 i retrieve it inside master manifest file ?


Read about facts: https://docs.puppetlabs.com/learning/variables.html

Cheers,
Paul 

-- 
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/a9afb4a9-88a8-4fa8-88b8-cf832b5b4098%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Could not request certificate: Error 405 on SERVER

2014-08-13 Thread Patrick Robinson
I had a similar error getting 405. I found I hadn't set the PassengerRoot 
directory correctly in the puppetmaster vhost config:

PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.48

-- 
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/df4b44ad-e1bc-484f-9e6c-259e31b4fbaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet can't get the right service status from centos5.3

2014-08-13 Thread li jackie


https://lh4.googleusercontent.com/-2j8w2ZuysAU/U-rOEIf5WGI/AIQ/oE2NS4B_-oQ/s1600/AEB7B4B0-75CF-4074-B133-02610CDDC042.pngwhy
 
puppet think the service is running?
https://lh4.googleusercontent.com/-2j8w2ZuysAU/U-rOEIf5WGI/AIQ/oE2NS4B_-oQ/s1600/AEB7B4B0-75CF-4074-B133-02610CDDC042.png/sbin/service
 
puppet status  or  /etc/init.d/puppet status   return the right status and 
exit code 
https://lh4.googleusercontent.com/-2j8w2ZuysAU/U-rOEIf5WGI/AIQ/oE2NS4B_-oQ/s1600/AEB7B4B0-75CF-4074-B133-02610CDDC042.pngbecause
 
of this, i have always  get a changed message: 
https://lh4.googleusercontent.com/-2j8w2ZuysAU/U-rOEIf5WGI/AIQ/oE2NS4B_-oQ/s1600/AEB7B4B0-75CF-4074-B133-02610CDDC042.png
fff 
https://lh4.googleusercontent.com/-2j8w2ZuysAU/U-rOEIf5WGI/AIQ/oE2NS4B_-oQ/s1600/AEB7B4B0-75CF-4074-B133-02610CDDC042.png
 











Notice: /Stage[main]/Puppet/Service[puppet]/ensure: ensure changed 
'running' to 'stopped'

my cluser show a rule:   almost all centos 5.3  have this issue.  5.8 and 
above 6  havn't 


-- 
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/8121ac9a-3a54-4e3c-9246-0198d29294a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to install GIT on puppet Server

2014-08-13 Thread Jason Antman
The module doesn't install git from source, because nobody should install
packages from source on a RedHat derivative OS. Have you read the
documentation for the git module? Or the package type, since you're
specifying the source parameter?


On Tue, Aug 12, 2014 at 7:17 PM, Vikas Kumar vikas...@gmail.com wrote:

 Hi Satish,

 I was looking the flavor of Linux OS not the kernel.

 Run the below command to check OS major and minor version.
 facter | egrep 'operatingsystem|lsbdistid|lsbdistdescription'


 Also, the output of the command states that you do not git in your
 repository.

 /usr/bin/yum -d 0 -e 0 -y list git


 *Note* Red Hat Network repositories are not listed below. You must run
 this command as root to access RHN repositories.
 Error: No matching Packages to list

 I think *git* rpm is there by default in all RedHat based OS. Still can
 you run below commands and share the output.

 yum clean all
 yum repolist
 yum list all | grep git


 Regards,
 Vikas

 On Tuesday, 12 August 2014 20:52:39 UTC+10, Satish Katuru wrote:

 Hi Vikas,

 Please find the below information:

 Linux version: *Linux 2.6.32-358.6.2.el6.x86_64 x86_64*


 Below is the output for the command

 /usr/bin/yum -d 0 -e 0 -y list git



 **Note* Red Hat Network repositories are not listed below. You must run
 this command as root to access RHN repositories.Error: No matching Packages
 to list*


 On Tuesday, August 12, 2014 12:42:10 PM UTC+5:30, Vikas Kumar wrote:

 Hi Satish,

 Which flavor or version of Linux are you using ?

 I can try creating the scenario on my test machine and check myself.

 In the meantime, can you please post output of this command -
 /usr/bin/yum -d 0 -e 0 -y list git



 A small suggestion - Use code syntax for pasting logs, it makes a post
 much readable.

 Regards,
 Vikas

  --
 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/8f0d8e9c-28ed-4ffe-9e7f-d676a73dc844%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/8f0d8e9c-28ed-4ffe-9e7f-d676a73dc844%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/CAFt4V4m%2Bz_M0Ai_ed_cd1H2DdZMJFzqj0ae0PS76URdcnQGs%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures

2014-08-13 Thread Jason Antman
Seb,

You really shouldn't be running specs for dependent modules.

(1) If I were you, I'd really use the spec helper, and garethr's module
skeleton - https://github.com/garethr/puppet-module-skeleton
(2) looking at your code, you should just be able to
t.pattern = 'spec/(classes|defines)/*_spec.rb'

-Jason


On Tue, Aug 12, 2014 at 2:47 PM, Sebastian Otaegui fen...@gmail.com wrote:

 Hello all,

 I have created this module:

 https://github.com/Spantree/puppet-thrift and everything worked fine all
 specs ran fine.

 Now I using the puppetlabs/apt module and when I run the 'rake spec' it is
 trying to run the 'apt' tests, and it is failing (I think) because I am not
 providing the appropriate facts.

 Is there a way to ignore the rspecs inside the fixtures/modules/ directory?

 I tried to do this:

 require 'rake'require 'rspec/core/rake_task'

 RSpec::Core::RakeTask.new(:spec) do |t|  t.pattern = 'spec/*/*_spec.rb'end



 But it didn't work.

 Can anybody point me in the right direction here?

 Thanks in advance,
 Seb

 --
 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/1d7b8768-0e72-40c3-97f7-623d08f028ac%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/1d7b8768-0e72-40c3-97f7-623d08f028ac%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/CAFt4V4nPxPATgQVjzBdT2C5zu7B4zQbog-SSQE_o8-KKgcdFfA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] increasing frequency of puppet agent runs during initial deployment?

2014-08-13 Thread Jason Antman
On Thu, Jul 31, 2014 at 9:21 AM, jcbollinger john.bollin...@stjude.org
wrote:




 That being said... don't run via cron.



 ... if all you want it for is provisioning.  For Puppet's core use --
 ongoing configuration management -- there are a lot of advantages to
 scheduling agent runs via cron instead of running the agent as a daemon.
 Also a couple of limitations.


 John


Ever since I started running via MCollective, I think I was crazy to ever
have done otherwise. Especially with `mco puppet runall N` where N is the
number of concurrent nodes my master can support.

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


Re: [Puppet Users] More admins using the same master

2014-08-13 Thread Jason Antman
Yeah. You don't need to give them access to the master, you need something
(I use a git hook on the git server) that deploys new pushes to the master.


On Tue, Aug 5, 2014 at 12:15 PM, Christopher Wood 
christopher_w...@pobox.com wrote:

 Off the top of my head, have them commit/push to the same git repository
 where that repository is checked out by the puppetmaster. You can give them
 each a VM to test their own stuff, where they'll also find out how their
 manifests interact with the whole picture. Keeping them in their own little
 silos will hurt you in the long run, and also potentially much sooner than
 that if two of them find they need to combine incompatible pieces.

 On Tue, Aug 05, 2014 at 09:00:50AM -0700, Luca Mazzaferro wrote:
 Dear User community,
 I would know if anyone has experience of using puppet
 with multiple developers.
 I try to explain better.
 I have ONE master and some nodes attached.
 We have more than 3 users which want to develop their module and
 deploy
 them on different machines.
 I know that we can define different environments and in principle
 give one for each developer.
 But in this case I need to give the access to the master to each one
 and I wouldn't.
 In principle I would that the users develop their code on their pc,
 then
 commit
 it via git ( for example ) and when they run puppet agent on their
 machines
 the master catch the new code and apply it.
 I found the config_version variable inside the environment.conf should
 work running a git clone inside the environments
 before the execution on the clients.
 Is there another way, simpler?
 Anyone has any experience of it?
 Thank you.
 Regards.
 Luca
 
 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 [2]
 https://groups.google.com/d/msgid/puppet-users/e87c69cd-f182-463c-9c53-7225c9adfce5%40googlegroups.com
 .
 For more options, visit [3]https://groups.google.com/d/optout.
 
  References
 
 Visible links
 1. mailto:puppet-users+unsubscr...@googlegroups.com
 2.
 https://groups.google.com/d/msgid/puppet-users/e87c69cd-f182-463c-9c53-7225c9adfce5%40googlegroups.com?utm_medium=emailutm_source=footer
 3. 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/20140805161502.GA9324%40iniquitous.heresiarch.ca
 .
 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/CAFt4V4%3DuaQYb7WOkU3%3DQxZP587qjrSc0-Rmx%2BfePgPrd1n6xmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] increasing frequency of puppet agent runs during initial deployment?

2014-08-13 Thread José Luis Ledesma
+1000
El 13/08/2014 14:50, Jason Antman ja...@jasonantman.com escribió:




 On Thu, Jul 31, 2014 at 9:21 AM, jcbollinger john.bollin...@stjude.org
 wrote:




 That being said... don't run via cron.



 ... if all you want it for is provisioning.  For Puppet's core use --
 ongoing configuration management -- there are a lot of advantages to
 scheduling agent runs via cron instead of running the agent as a daemon.
 Also a couple of limitations.


 John


 Ever since I started running via MCollective, I think I was crazy to ever
 have done otherwise. Especially with `mco puppet runall N` where N is the
 number of concurrent nodes my master can support.

 --
 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/CAFt4V4kbUZYQxGC_axaySy%2By2ZL_h0YdemknHTyp5fEJuRFihA%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAFt4V4kbUZYQxGC_axaySy%2By2ZL_h0YdemknHTyp5fEJuRFihA%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/CAF_B3dfz--iYVEGUVTQSpXEmUiZLSAJjdbsp5%2B3i4Dh%2B-p9iqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet's yumhelper.py vs. other pythons on the system

2014-08-13 Thread Jason Antman
So... there *is* a bug open that relates to this,
https://tickets.puppetlabs.com/browse/PUP-2144 (and by extension
https://tickets.puppetlabs.com/browse/PUP-1362 which appears to be being
worked on, and would fix this).

I don't know if that should work, and I honestly don't know how to set a
global path for Puppet. I can think of a few options:
(1) set the path wherever you run puppet from (cron, init script if daemon,
etc.)
(2) change the ordering in the default root path
(3) wait for one of the above tickets to be fixed and released

That being said, for future reference, it's generally (I know some will
disagree) bad practice to install a non-system-compatible Python in a
globally-used path.


On Wed, Aug 6, 2014 at 5:24 PM, johnjmed...@gmail.com wrote:

 When trying to add packages to a CentOS 6 system I am getting chronic
 errors of the form:

 Error: Could not get latest version: Execution of '/usr/local/bin/python
 /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned
 1: type 'exceptions.AttributeError'

 Error: /Stage[main]/Jenkins_packages::Centos/Package[subversion]/ensure:
 change from 1.6.11-10.el6_5 to latest failed: Could not get latest version:
 Execution of '/usr/local/bin/python
 /usr/lib/ruby/site_ruby/1.8/puppet/provider/package/yumhelper.py' returned
 1: type 'exceptions.AttributeError'


 whether manually running puppet agent --test or letting cron do it for
 me.

 This seems to be because the default root path in CentOS includes
 /usr/local/bin before /usr/bin, and thus I am getting a user-needed other
 python version that is a mismatch with the python version that puppet seems
 to want to play with.

 When I run:

 puppet agent --test --path /sbin:/bin:/usr/sbin:/usr/bin:/root/bin


 things seem to work without complaint.

 I tried to set that path in /etc/puppet/puppet.conf, but it doesn't seem
 to work. Should that work?

  --
 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/45991a27-d387-498a-ab8c-975e387db468%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/45991a27-d387-498a-ab8c-975e387db468%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/CAFt4V4%3Dv47Mh_TWAA9-t-9VZN%3DSNu1nNajNEKD05pXbMh5Xrvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] jenkins workflow

2014-08-13 Thread Jason Antman
(1) a compile test is good, really good. make sure cheap tests happen first
(and fail fast) before expensive ones.
(2) I have a strong bias for having the automated jobs just run bundle
exec rake test or something like that, so that you can use the same job
for multiple modules


On Thu, Aug 7, 2014 at 8:11 AM, Nick Cammorato nick.cammor...@gmail.com
wrote:

 Pre-commit hooks are great but Github and github enterprise won't enforce
 them(arbitrary code on the server is uncool for some reason), so if you
 want to be 100% and use either they still need to be run as part of your
 jenkins build task.
 On Aug 6, 2014 7:11 PM, John Warburton jwarbur...@gmail.com wrote:

 On 7 August 2014 02:17, Bernard Clark berniecla...@gmail.com wrote:

 I'm setting up a jenkins server to perform continuous integration on my
 puppet codebase, and I'm interested in running at least the following tests:

- puppet parser validate
- puppet lint

 These are cheap to do. Give yourself immediate feedback by making them
 pre commit hooks -
 http://puppetlabs.com/blog/how-set-git-commit-hooks-puppet-enterprise


- rspec-puppet
- test-kitchen

 Have I overlooked any other worthwhile tests, and has the community
 distilled any wisdom about best practices, particularly regarding git
 workflow? Any advice would be much appreciated!

 Look at server spec as well - http://serverspec.org/

 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/CAAJLFxV%2BmR%3D88Wkh-GXYqOuZdboXdH2YTV%3DtAM47n0yUVNegKQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAAJLFxV%2BmR%3D88Wkh-GXYqOuZdboXdH2YTV%3DtAM47n0yUVNegKQ%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/CAKJ8awdGpfA7Ox9TbYqgdfOwLMax-2mTqvQZ1PpxKZjToGnZWw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAKJ8awdGpfA7Ox9TbYqgdfOwLMax-2mTqvQZ1PpxKZjToGnZWw%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/CAFt4V4%3DDAG8GsnzvYDXc9xKWKpTdUgq-Jc67eQ%2BGPwwwYa0Rqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures

2014-08-13 Thread Jason Antman
Seb,

I actually *just* came by a very similar issue myself. The examples at
http://murphyslaw.github.io/blog/2012/04/06/run-specs-excluding-integration-specs/
should help you.

-Jason


On Wed, Aug 13, 2014 at 8:42 AM, Jason Antman ja...@jasonantman.com wrote:

 Seb,

 You really shouldn't be running specs for dependent modules.

 (1) If I were you, I'd really use the spec helper, and garethr's module
 skeleton - https://github.com/garethr/puppet-module-skeleton
 (2) looking at your code, you should just be able to
 t.pattern = 'spec/(classes|defines)/*_spec.rb'

 -Jason


 On Tue, Aug 12, 2014 at 2:47 PM, Sebastian Otaegui fen...@gmail.com
 wrote:

 Hello all,

 I have created this module:

 https://github.com/Spantree/puppet-thrift and everything worked fine all
 specs ran fine.

 Now I using the puppetlabs/apt module and when I run the 'rake spec' it
 is trying to run the 'apt' tests, and it is failing (I think) because I am
 not providing the appropriate facts.

 Is there a way to ignore the rspecs inside the fixtures/modules/
 directory?

 I tried to do this:

 require 'rake'require 'rspec/core/rake_task'

 RSpec::Core::RakeTask.new(:spec) do |t|  t.pattern = 'spec/*/*_spec.rb'end



 But it didn't work.

 Can anybody point me in the right direction here?

 Thanks in advance,
 Seb

 --
 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/1d7b8768-0e72-40c3-97f7-623d08f028ac%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/1d7b8768-0e72-40c3-97f7-623d08f028ac%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/CAFt4V4mukbYuwbB3iY9pLAJsMNRQE6RGk5VY_yLeC-BKiAv05w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet uses catalog of node B for node A

2014-08-13 Thread Helmut Rickel
Hello Jose,

I have to correct myself: In 
https://docs.puppetlabs.com/learning/modules1.html 
https://www.google.com/url?q=https%3A%2F%2Fdocs.puppetlabs.com%2Flearning%2Fmodules1.htmlsa=Dsntz=1usg=AFQjCNGoq0dcHlmchq4oKTDL7djCyIwelg
 
it is not suggested to use include in init.pp, but for an example 
include is used in the same file as the class definition. 

However, your hint is correct: include should not be used in init.pp. 
Otherwise the included class may be used for nodes do not need it 
according to hiera oder node-statements. This looks a bit like a bug 
for me, but I do not have enough experience with puppet to judge this.

Thanks again!
Helmut

Am Montag, 11. August 2014 08:53:42 UTC+2 schrieb Helmut Rickel:

 Hello Jose,

 thanks a lot for this hint. It solves my problem!

 I am highly astonished as I got the idea for placing the 
 include-statements in init.pp from 
 https://docs.puppetlabs.com/learning/modules1.html .

 Right now, I do not understand why the include-Statements are not 
 necessary here and why they even mess things up. I will add a comment here 
 as soon as I know the answers.

 Kind regards
 Helmut

 Am Freitag, 8. August 2014 22:08:16 UTC+2 schrieb Jose Luis Ledesma:

 Hi,

 If I understand correctly you have an include java|tomcat inside the 
 init.pp of each class definition?

 I don't really know what is happening but I bet that if you remove these 
 lines it will start to work correctly.

 Regards,
 El 08/08/2014 15:12, Helmut Rickel hrick...@gmail.com escribió:

 Hello John,
 I made the situation as simple as possible and - unfortunatly - I still 
 can reproduce the problem.

 I have two nodes called BGHW-DS-T-AA1 and BGHW-DS-T-SA1 and two modules 
 called java and tomcat. The only task of the modules is to copy one file to 
 the node. The module java is used on both nodes while tomcat is needed on 
 BGHW-DS-T-SA1 only. This is defined via hiera. I append the files at the 
 end of this posting. 

 After restarting the puppet master I call puppet agent -t on 
 BGHW-DS-T-AA1 in a while-loop and the module java is applied. After some 
 time I call puppet agent -t on BGHW-DS-T-SA1 and afterwards the module 
 tomcat is applied on BGHW-DS-T-AA1 as well!

 This is the shell on BGHW-P-AA1 (the important line is the red one):
 BGHW-DS-T-AA1:/data/software # while true; do date ; puppet agent -t; 
 sleep 1; echo ; done
 Fr 8. Aug 14:22:11 CEST 2014
 Info: Retrieving plugin
 Info: Caching catalog for bghw-ds-t-aa1.bghw.de
 Info: Applying configuration version '1407500588'
 Notice: My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I 
 identify myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 
 'BGHW-DS-T-AA1'
 Notice: /Stage[main]/Main/Notify[Node ID]/message: defined 'message' as 
 'My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I identify 
 myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 'BGHW-DS-T-AA1''
 Notice: Finished catalog run in 2.20 seconds

 Fr 8. Aug 14:22:17 CEST 2014
 Info: Retrieving plugin
 Info: Caching catalog for bghw-ds-t-aa1.bghw.de
 Info: Applying configuration version '1407500588'
 Notice: My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I 
 identify myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 
 'BGHW-DS-T-AA1'
 Notice: /Stage[main]/Main/Notify[Node ID]/message: defined 'message' as 
 'My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I identify 
 myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 'BGHW-DS-T-AA1''
 Notice: Finished catalog run in 2.13 seconds

 Fr 8. Aug 14:22:25 CEST 2014
 Info: Retrieving plugin
 Info: Caching catalog for bghw-ds-t-aa1.bghw.de
 Info: Applying configuration version '1407500588'
 Notice: My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I 
 identify myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 
 'BGHW-DS-T-AA1'
 Notice: /Stage[main]/Main/Notify[Node ID]/message: defined 'message' as 
 'My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I identify 
 myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 'BGHW-DS-T-AA1''
 Notice: Finished catalog run in 2.24 seconds

 Fr 8. Aug 14:22:32 CEST 2014
 Info: Retrieving plugin
 Info: Caching catalog for bghw-ds-t-aa1.bghw.de
 Info: Applying configuration version '1407500588'
 Notice: My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I 
 identify myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 
 'BGHW-DS-T-AA1'
 Notice: /Stage[main]/Main/Notify[Node ID]/message: defined 'message' as 
 'My certificate identifies me as 'bghw-ds-t-aa1.bghw.de'; I identify 
 myself as 'bghw-ds-t-aa1.bghw.de', or alternatively as 'BGHW-DS-T-AA1''
 Notice: 
 /Stage[main]/Tomcat/File[/data/software/apache-tomcat-7.0.37.tar.gz]/ensure:
  
 defined content as '{md5}a3cfe7ea8e8d2155cb2a0016e10b615f'
 Notice: Finished catalog run in 4.97 seconds

 Fr 8. Aug 14:22:43 CEST 2014
 Info: Retrieving plugin
 Info: Caching catalog for bghw-ds-t-aa1.bghw.de
 Info: Applying configuration version '1407500588'
 Notice: My 

[Puppet Users] Re: Augeas hates me!!!

2014-08-13 Thread randal cobb
ok, that didn't seem to help.  I now have this result:
Debug: Augeas[apache2](provider=augeas): Opening augeas with root /, lens 
path , flags 64
Debug: Augeas[apache2](provider=augeas): Augeas version 1.0.0 is installed
Debug: Augeas[apache2](provider=augeas): Will attempt to save and only run 
if files changed
Debug: Augeas[apache2](provider=augeas): sending command 'set' with params [
/files/etc/sysconfig/apache2/APACHE_MODULES, \actions alias auth_basic 
authn_file authz_host authz_groupfile authz_user autoindex cgi dir env 
expires include log_config mime negotiation setenvif ssl userdir reqtimeout 
authn_core authz_core status asis auth_digest headers proxy proxy_http 
rewrite vhost_alias authz_default proxy_balancer\]
Debug: Augeas[apache2](provider=augeas): Skipping because no files were 
changed
Debug: Augeas[apache2](provider=augeas): Closed the augeas connection


from this manifest entry:
augeas { 'apache2':
context = /files/etc/sysconfig/apache2,
lens= sysconfig.lns,
incl= '/usr/share/augeas/lenses/dist/',
changes =
'set APACHE_MODULES \'actions alias auth_basic authn_file 
authz_host authz_groupfile authz_user autoindex cgi dir env expires include 
log_config mime negotiation setenvif ssl userdir reqtimeout authn_core 
authz_core status asis auth_digest headers proxy proxy_http rewrite 
vhost_alias authz_default proxy_balancer\'',
}




On Tuesday, August 12, 2014 8:38:59 PM UTC-4, Vikas Kumar wrote:

 Hello,

 I think double quotes in your set statement are the culprit.

 Try to use set as below

 'set /files/whatever/path \'your text in quotes\'',



 Regards,
 Vikas


-- 
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/2b04d1c1-6a6b-4544-b77b-b1f916838cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet uses catalog of node B for node A

2014-08-13 Thread jcbollinger
Hello Helmut,

I am glad you have resolved your issue.

I have recently been travelling, and hence not responsive to this list, but 
I feel compelled to observe that the problem turned out to be exactly what 
I said in my initial response it might be: In particular, I am inclined to 
guess that one or more of your manifests [...] has some top-scope 
declarations that are neither class nor type definitions.  That response 
goes on to explain why having such declarations is a problem.

I can also be more specific now, since it seems you may be tripping over 
the semantics of the 'include' statement.  It is essential to understand 
that 'include' directs Puppet that the designated class must be included in 
the catalog being constructed -- NOT to interpolate any additional DSL code 
into the manifest file in which it appears.


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/eb14bae4-ea00-4a90-adb3-1c67b0b4757d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Exported resources applied on exporting host - EL7 only

2014-08-13 Thread jcbollinger


On Tuesday, August 12, 2014 12:49:27 PM UTC-5, treydock wrote:

 I have noticed a very strange problem on CentOS 7 nodes where they are 
 collecting and/or applying their exported resources.  I have a class called 
 brazos::firewall that's used internally to export a firewall rule that is 
 then collected by brazos::gw to allow specific systems through the 
 gateway server's NAT.  Below are the actual classes.  I've found that on 
 CentOS 6 systems, the resource is correctly exported (NOT applied by 
 exporting host) and collected by the gw server.  On CentOS 7 systems the 
 resource is exported, and also applied by the exporting host when it's not 
 supposed to be.



Are you applying you using agent and master, or are you just running 
'puppet apply'?  The former makes much more sense to me for exporting and 
collecting resources (though I *think* the latter can work, too).  On the 
other hand, only if you are running 'puppet apply' does catalog compilation 
happen in different environments for different machines.  If you are 
running in master/agent mode, then the problem must be in your manifests 
and/or data.

Are you certain that the exported firewall rules are in fact being 
collected on the wrong nodes?  Is it possible that those rules were added 
previously, and just not cleaned out?  You can check by cleaning them out 
manually and then rerunning Puppet, or by looking for them in the nodes' 
catalogs.

Alternatively, are you certain that there is no other Firewall| | 
collector somewhere in your manifests that might be picking up the rules at 
issue?



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/2880f45a-ae80-4ee2-99a2-a24a551961cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Managing multiple hosts in a single service

2014-08-13 Thread Andrew Melo
Hello, all-

I've been (unsuccessfully) looking for/thinking of a solution to the 
following problem and am unsuccessful, so I figured I'd ask here.

If you have a service that's across multiple hosts (say, memcached or a 
mysql/galera HA cluster) where each node needs to know the hostnames of the 
other nodes in that service, is there another way to implement this in 
puppet other than first applying the role to each node in the service and 
then having a list of hostnames stored as a variable in hiera? I'm new to 
puppet, so I'm unsure if there's a better practice than having to hardcode 
the hiera part.

Cheers,
Andrew

-- 
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/085ebdb1-3780-42c7-bc53-ebe682ca8984%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Chocolatey repos

2014-08-13 Thread huhm4n
Can I create my local repo to fetch the packages from instead of pulling it 
from the web using chocolatey? 

-- 
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/dcc64012-29b3-42c5-a05d-89f6ce36d486%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppet slow when ensuring user with groups in combination with winbind auth

2014-08-13 Thread jcbollinger


On Monday, August 11, 2014 8:50:36 AM UTC-5, Jan van Lith wrote:

 Hi,

 I am using winbind with winbind enum groups = yes on some of our 
 servers. 
 When ensuring a user that is local (and also in AD, so it has a lot of 
 groups) the puppet run takes ages. Winbind process is taking a lot of cpu 
 and when I strace it AD groups are passing by.

 This is the manifest:

  # ensure user and group  
 user { user:
   ensure = 'present',
   groups = 'logongroup',
   uid= '900',
   require= Group[$user],
   managehome = true,
 }
 group { user:
   ensure = 'present',
   gid= '900',
 }

 # id user
 uid=900(user) gid=900(user) 
 groups=900(user),400(logongroup),1629(domain users) .

 What is puppet doing?



It is likely enumerating all the groups defined for the machine, which it 
will do at the beginning of a run as part of determining the machine's 
initial state.  If winbind allows groups to be enumerated (as you 
specifically say it does for these machines) then those will include all 
the groups winbind can enumerate from AD.  Since you're using the name 
service switch, Puppet probably can't even tell that it's getting both AD 
groups and local groups.

 

 I am presuming it is checking if this user is a member of the logongroup. 



Puppet likely uses the 'groups' command to load users' secondary groups.  
It might be that that requires scanning all AD groups (it does require 
scanning all local groups).  If determining a user's secondary groups 
generally takes a long time in a given environment, then there's probably 
nothing you can do to make Puppet do the job faster than is generally 
required.

Moreover, Puppet probably determines the secondary groups for all system 
users, which means the cost of running 'groups' is likely multiplied by the 
number of defined system users.  Furthermore, the known system users 
include those who are not permitted to log on, so that could extend to all 
users in AD.

 

 Can you make puppet not performing these group checks preforming in AD?



Sure, by disabling winbind in nsswitch.conf.  But you probably don't want 
to do that.  Likely disabling group enumeration by winbind would also speed 
things up, but (1) you probably have it enabled for a reason, (2) Puppet 
probably then will not be able to determine users' membership in AD 
secondary groups, and (3) AD secondary groups might not work at all, at 
least for local users.

 

 My nsswitch.conf tells it to first look in local files. 



The problem is likely tied to the fact that by using winbind for groups at 
all, you add a gazillion groups to your system.  Name resolution precedence 
doesn't change that.

 


 passwd: files winbind
 shadow: files winbind
 group:  files winbind

 So why is it still performing these tasks when the logongroup is already 
 present in local files?



It's probably not specific to this user, and almost certainly not to the 
'logongroup' group.


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/2207c659-1195-4b30-a392-00a62159972e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Wild Card in Augeas

2014-08-13 Thread David Lutterkort
Hi Vikas,

to set multiple nodes, you need to use the 'setm' command; 'set' will only 
change a single node. Also, the path expressions in Augeas are more like 
XPath, and therefore don't have globbing built in. In augtool, you'd do 
what you want with this command:

   setm /files/etc/sysconfig/network-scripts/*[label() =~ glob('ifcfg-*')] 
NM_CONTROLLED no

The corresponding Augeas resource would be something like

augeas { network-tweaks-RedHat:
context = /files/etc/sysconfig/network-scripts,
changes = [setm *[label() =~ glob('ifcfg-*')] NM_CONTROLLED no],
}

David

On Monday, August 11, 2014 10:28:26 PM UTC-7, Vikas Kumar wrote:

 Dear All,

 I am trying to use augeas to change the value of NM_CONTROLLED to no on 
 all my RHEL 6.X machines. However, the number of ethernet cards differ on 
 each server, thus I want to use expression or wild cards.

   if $::operatingsystemmajrelease == '6' {
 augeas { network-tweaks-RedHat:
 context = /files/etc/sysconfig/network-scripts/ifcfg-eth[0-9],
 changes = [
 'set 
 /files/etc/sysconfig/network-scripts/ifcfg-eth[0-9]/NM_CONTROLLED \'no\''
 ,
],
 }
   }

 I wrote the above code but it does't do the job. Please suggest.

 Regards,
 Vikas




-- 
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/9a33997e-119e-4c6f-9e90-e7f66123bb35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet/yum fails to install old packages

2014-08-13 Thread jcbollinger


On Friday, August 8, 2014 10:33:48 AM UTC-5, Mark Rosedale wrote:

 Hey Matthias, 

 Thanks for the response. So I do see some additional information that may 
 help. 

 So it appears that puppet does successfully install postgresql and 
 postgresql-server and postgres92, and that explains what did get installed.

 Notice: /Stage[pre]/Yum::Repo/Exec[refresh-yum-cache]: Triggered 'refresh' 
 from 1 events
 Notice: 
 /Stage[main]/Postgresql::Install/Package[postgresql-8.1.23-10.el5_10]/ensure: 
 created
 Notice: 
 /Stage[main]/Postgresql::Install/Package[postgresql-server-8.1.23-10.el5_10]/ensure:
  
 created
 Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-server-9.2.8-1PGDG.rhel5' returned 1: postgres
 ql92-9.2.8-1PGDG.rhel5.x86_64 from vivox-postgresql has depsolving problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-po
 stgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-p
 ostgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 Wrapped exception:
 Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-server-9.2.8-1PGDG.rhel5' returned 1: 
 postgresql92-9.2.8-1PGDG.rhel5.x8
 6_64 from vivox-postgresql has depsolving problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-po
 stgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-p
 ostgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 Error: 
 /Stage[main]/Postgresql::Install/Package[postgresql92-server]/ensure: 
 change from absent to 9.2.8-1PGDG.rhel5 failed: Could n
 ot update: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-server-9.2.8-1PGDG.rhel5' returned 1: postgresql92-9.2.8-1PG
 DG.rhel5.x86_64 from vivox-postgresql has depsolving problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-po
 stgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-p
 ostgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-contrib-9.2.8-1PGDG.rhel5' returned 1: postgre
 sql92-9.2.8-1PGDG.rhel5.x86_64 from vivox-postgresql has depsolving 
 problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-po
 stgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-p
 ostgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 Wrapped exception:
 Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-contrib-9.2.8-1PGDG.rhel5' returned 1: 
 postgresql92-9.2.8-1PGDG.rhel5.x
 86_64 from vivox-postgresql has depsolving problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-po
 stgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-p
 ostgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 package-cleanup --dupes
 rpm -Va --nofiles --nodigest
 Wrapped exception:
 Execution of '/usr/bin/yum -d 0 -e 0 -y install 
 postgresql92-devel-9.2.8-1PGDG.rhel5' returned 1: 
 postgresql92-9.2.8-1PGDG.rhel5.x86_64 from vivox-postgresql has depsolving 
 problems
   -- Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-postgresql)
 Error: Missing Dependency: postgresql92-libs = 9.2.8-1PGDG.rhel5 is needed 
 by package postgresql92-9.2.8-1PGDG.rhel5.x86_64 (vivox-postgresql)
  You could try using --skip-broken to work around the problem
  You could try running: package-cleanup --problems
 

[Puppet Users] CI manifest Validation when using Jenkins with a Windows node

2014-08-13 Thread aaronm
I'm working on trying to get some validations into my CI process but am 
hitting a speedbump - Windows

I use Jenkins to do my builds, and the slave it uses is a Windows server. 
 This works fine, as Winscp copies the files over to my linux Puppet Master 
and it sends the files on their merry way.  No problem, as long as I am the 
only one writing manifests and I make sure to use puppet parser validate 
and lint to ensure they're right.

But, with the possibility of mistakes, I thought it would be wise to get 
some sort of double-checking involved.  The basic things I heard about at 
PuppetCampNYC as well as general conversation on the web appears 
well-groomed here https://gist.github.com/stephenc/3053561

The only problem is shell scripts and packages that can't be run on 
Windows.  Do you fellas have any plans on releasing a Windows capable 
module that can do some of the validation, lint, spec things on Windows 
build boxes?  Do you know of anything I may not have come across yet?

simple solution - use a linux build box instead of the Windows one (which 
I'm contemplating)
tougher solution - figure out how it can be done with Windows
wrong solution - don't do it

Thanks,
Aaron

-- 
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/b39a2439-61f4-490f-814d-a461cc82548f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Submit a talk or attend a Puppet Camp

2014-08-13 Thread Dawn Foster
I wanted to let people know that we have several open CFPs for Puppet
Camps around the world, and we are looking for talk proposals!

Düsseldorf on October 16, 2014

* CFP deadline is August 16:
https://docs.google.com/spreadsheet/viewform?formkey=dGFJQWdPeTREd01lZUxwNW12cEVUTFE6MA
* Details: http://www.netways.de/puppetcamp
* Note: Camp is the day after LinuxCon / Cloud Open on October 13 - 15.

Melbourne on November 7, 2014

* CFP deadline is September 3:
https://docs.google.com/spreadsheet/viewform?formkey=dGxNYUhISFpXZFBTMU16UkJJQ0U5U3c6MA
* Details: https://puppetcampmelbourne2014.eventbrite.com

Seattle on November 11, 2014

* CFP deadline is September 10:
https://docs.google.com/spreadsheet/viewform?formkey=dGx2Y0pQZjlxQnVQMnBkVXNDWHBMSHc6MA
* Details: https://puppetcampseattle2014.eventbrite.com
* Note: Held at USENIX LISA, which is November 9 - 14.

London on November 17, 2014

* CFP deadline is September 10:
https://docs.google.com/spreadsheet/viewform?formkey=dFB5MENXemFWTjVBVFdaa0dlelRVdFE6MA
* Details: https://puppetcamplondon22014.eventbrite.com

Atlanta on December 9, 2014

* CFP deadline is October 1:
https://docs.google.com/spreadsheet/viewform?formkey=dDFPekRUWXc4Wm5iQ2h4SGdyN21sQlE6MA
* Details: https://puppetcampatlanta2014.eventbrite.com

More details: http://puppetlabs.com/blog/we-need-you-speak-puppet-camp

Thanks,
Dawn Foster
Director of Community
http://puppetlabs.com/community

-- 
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/CAPUeXZpUsjY0Qq21tb%3Dvo4e_m_AMd-HF8_6c1h7vQ_n5XR8iaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: scheduled_task changes on every puppet run

2014-08-13 Thread aaronm
I am getting similar logs every day, but I am not using any scheduled tasks 
in my manifests...

(**this is on PE 3.3 installed a week or two ago**)
trigger changed '{'every' = '1', 'schedule' = 'daily', 'start_date' = 
'2014-8-12', 'start_time' = '13:00'}' to '[{'every' = '1', 'schedule' = 
'daily', 'start_time' = '13:00'}]'

/Stage[main]/Pe_mcollective::Server/Scheduled_task[pe-mcollective-metadata]/trigger

/opt/puppet/share/puppet/modules/pe_mcollective/manifests/server.pp

---

(**this is from a longrunning PE server running 3.2 installed many months 
ago**)
trigger changed '{'every' = '1', 'schedule' = 'daily', 'start_date' = 
'2014-8-12', 'start_time' = '13:00'}' to '[{'every' = '1', 'schedule' = 
'daily', 'start_time' = '13:00'}]'

/Stage[main]/Pe_mcollective::Server/Scheduled_task[pe-mcollective-metadata]/trigger

/opt/puppet/share/puppet/modules/pe_mcollective/manifests/server.pp 

On Thursday, August 7, 2014 7:36:18 AM UTC-4, cko wrote:

 Hi,

 I'm using the following scheduled_task on one of my windows server 2008 r2 
 boxes:

 scheduled_task { 'reboot':
   command   = 'C:\WINDOWS\System32\shutdown.exe',
   arguments = -r -f -t 01,
   user  = 'SYSTEM',
   trigger   = {
 schedule= weekly,
 start_time  = '06:00',
 every   = 1,
 day_of_week = sun,
   }
 }


 Puppet creates the task and works just fine.

 However, on every single puppet run the trigger changes (even though I 
 didn't change the puppet code).

 The report shows the following output:
  

 *Notice: /Stage[main]/Main/Node[NODE]/Scheduled_task[reboot]/trigger: 
 trigger changed '{'every' = '1', 'on' = ['sun'], 'schedule' = 'weekly', 
 'start_date' = '2014-8-7', 'start_time' = '06:00'}' to '[{'day_of_week' 
 = ['sun'], ' every' = '1', 'schedule' = 'weekly', 'start_time' = 
 '06:00'}]' Notice: Finished catalog run in 6.55 seconds*

  
 Is there anything I can do to achieve idempotence with this scheduled task?


-- 
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/e7823a79-676c-4c6e-a985-378d264e91f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures

2014-08-13 Thread Wil Cooley
On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com wrote:

 Hello all,

 I have created this module:

 https://github.com/Spantree/puppet-thrift and everything worked fine all
specs ran fine.

 Now I using the puppetlabs/apt module and when I run the 'rake spec' it
is trying to run the 'apt' tests, and it is failing (I think) because I am
not providing the appropriate facts.

 Is there a way to ignore the rspecs inside the fixtures/modules/
directory?

 I tried to do this:

 require 'rake'
 require 'rspec/core/rake_task'

 RSpec::Core::RakeTask.new(:spec) do |t|
   t.pattern = 'spec/*/*_spec.rb'
 end

 But it didn't work.


How about just:

require 'puppetlabs_spec_helper/rake_tasks'

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


Re: [Puppet Users] Re: Augeas hates me!!!

2014-08-13 Thread John Warburton
On 14 August 2014 01:22, randal cobb rco...@gmail.com wrote:

 ok, that didn't seem to help.  I now have this result:
 Debug: Augeas[apache2](provider=augeas): Opening augeas with root /, lens
 path , flags 64


You may find templates much easier to manage

I gave up on Augeas a long time ago due to this complexity, lack of lenses
and because to someone looking at a file, it wasn't obvious augeas/puppet
was managing it. A file with VCS artefacts at the top makes it more obvious
what is going on..

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


Re: [Puppet Users] How to make puppetlabs_spec_helper ignore modules inside fixtures

2014-08-13 Thread Garrett Honeycutt
On 8/13/14 9:08 PM, Wil Cooley wrote:
 
 On Aug 12, 2014 11:57 AM, Sebastian Otaegui fen...@gmail.com
 mailto:fen...@gmail.com wrote:

 Hello all, 

 I have created this module: 

 https://github.com/Spantree/puppet-thrift and everything worked fine
 all specs ran fine.

 Now I using the puppetlabs/apt module and when I run the 'rake spec'
 it is trying to run the 'apt' tests, and it is failing (I think) because
 I am not providing the appropriate facts.

 Is there a way to ignore the rspecs inside the fixtures/modules/
 directory?

 I tried to do this: 

 require 'rake'
 require 'rspec/core/rake_task'

 RSpec::Core::RakeTask.new(:spec) do |t|
   t.pattern = 'spec/*/*_spec.rb'
 end

 But it didn't work.

 
 How about just:
 
 require 'puppetlabs_spec_helper/rake_tasks'

Hi,

+1 to Will Cooley.

When you generate a module with `puppet module generate` it will use
that single line.

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/53EC2D3B.1020009%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: puppet slow when ensuring user with groups in combination with winbind auth

2014-08-13 Thread Garrett Honeycutt
On 8/13/14 12:57 PM, jcbollinger wrote:
 
 
 On Monday, August 11, 2014 8:50:36 AM UTC-5, Jan van Lith wrote:
 
 Hi,
 
 I am using winbind with winbind enum groups = yes on some of our
 servers.
 When ensuring a user that is local (and also in AD, so it has a lot
 of groups) the puppet run takes ages. Winbind process is taking a
 lot of cpu and when I strace it AD groups are passing by.
 
 This is the manifest:
 
  # ensure user and group 
 user { user:
   ensure = 'present',
   groups = 'logongroup',
   uid= '900',
   require= Group[$user],
   managehome = true,
 }
 group { user:
   ensure = 'present',
   gid= '900',
 }
 
 # id user
 uid=900(user) gid=900(user)
 groups=900(user),400(logongroup),1629(domain users) .
 
 What is puppet doing?
 
 
 
 It is likely enumerating all the groups defined for the machine, which
 it will do at the beginning of a run as part of determining the
 machine's initial state.  If winbind allows groups to be enumerated (as
 you specifically say it does for these machines) then those will include
 all the groups winbind can enumerate from AD.  Since you're using the
 name service switch, Puppet probably can't even tell that it's getting
 both AD groups and local groups.
 
  
 
 I am presuming it is checking if this user is a member of the
 logongroup.
 
 
 
 Puppet likely uses the 'groups' command to load users' secondary
 groups.  It might be that that requires scanning all AD groups (it does
 require scanning all local groups).  If determining a user's secondary
 groups generally takes a long time in a given environment, then there's
 probably nothing you can do to make Puppet do the job faster than is
 generally required.
 
 Moreover, Puppet probably determines the secondary groups for all system
 users, which means the cost of running 'groups' is likely multiplied by
 the number of defined system users.  Furthermore, the known system users
 include those who are not permitted to log on, so that could extend to
 all users in AD.
 
  
 
 Can you make puppet not performing these group checks preforming in AD?
 
 
 
 Sure, by disabling winbind in nsswitch.conf.  But you probably don't
 want to do that.  Likely disabling group enumeration by winbind would
 also speed things up, but (1) you probably have it enabled for a reason,
 (2) Puppet probably then will not be able to determine users' membership
 in AD secondary groups, and (3) AD secondary groups might not work at
 all, at least for local users.
 
  
 
 My nsswitch.conf tells it to first look in local files.
 
 
 
 The problem is likely tied to the fact that by using winbind for groups
 at all, you add a gazillion groups to your system.  Name resolution
 precedence doesn't change that.
 
  
 
 
 passwd: files winbind
 shadow: files winbind
 group:  files winbind
 
 So why is it still performing these tasks when the logongroup is
 already present in local files?
 
 
 
 It's probably not specific to this user, and almost certainly not to the
 'logongroup' group.
 
 
 John
 

Hi Jan,

I'm not familiar with winbind itself though your performance might
improve by using nscd to cache the lookups.

and there's a module for that :)

https://github.com/ghoneycutt/puppet-module-nscd

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/53EC2E3D.4090304%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.