Re: [Puppet Users] Windows: Can't create/update file in user's home directory using template

2014-03-05 Thread Dirk Heinrichs
Am 05.03.2014 01:14, schrieb Rob Reynolds:

 This appears to be PUP-1389[1]. We've fixed a found issue with Windows
 2012 and ruby and how they handle the double line terminator. Note
 that the description is somewhat misleading, this can happen with any
 file name. We've fixed the issue, you will want to evaluate 3.4.3 to
 get it. This bug became more prominent once we applied a CVE fix for
 3.4.1. 

Yes, updating to 3.4.3 fixes the problem.

The description of PUP-1389 was indeed misleading as I checked the
release notes before posting to the list and found that none of the
fixed issues seemed to apply to my problem. Thanks for pointing me into
the right direction.

BTW: I had this problem on Windows Server 2008R2.

Bye...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com mailto:d...@recommind.com
*Skype*: dirk.heinrichs.recommind
www.recommind.com http://www.recommind.com



http://www.recommind.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/5316DCE8.9040507%40recommind.com.
For more options, visit https://groups.google.com/groups/opt_out.
inline: Logo.gif

Re: [Puppet Users] Re: puppet master stopped loading facts since puppetdb installation

2014-03-05 Thread Ryan Anderson
I'm not knocking on the gentleman with this issue, but I would like to 
helpfully recommend installing puppetdb via Puppet Labs' free puppetdb module. 
It takes care of such things for you, just my $.02.

-- 
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/b884f6ea-e87e-4259-adcc-2725b3b10ebb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Gem update fails in puppet daemon mode only

2014-03-05 Thread Christof Schöll
I get the following backtrace:
puppet-agent[28934]: Could not get latest version: undefined method `[]' 
for nil:NilClass
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/provider/package/gem.rb:111:in `latest'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/type/package.rb:139:in `block in insync?'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/type/package.rb:126:in `each'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/type/package.rb:126:in `insync?'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/property.rb:314:in 
`safe_insync?'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:117:in 
`sync_if_needed'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:81:in 
`perform_changes'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:20:in 
`evaluate'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:174:in 
`apply'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:187:in 
`eval_resource'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in 
`call'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in 
`block (2 levels) in evaluate'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/util.rb:327:in `block 
in thinmark'
puppet-agent[28934]: /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/util.rb:326:in 
`thinmark'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:117:in 
`block in evaluate'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in 
`traverse'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/transaction.rb:108:in 
`evaluate'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:164:in `block in apply'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/util/log.rb:149:in 
`with_destination'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/transaction/report.rb:108:in 
`as_logging_destination'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:163:in `apply'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:125:in 
`block in apply_catalog'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/util.rb:161:in `block 
in benchmark'
puppet-agent[28934]: /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/util.rb:160:in 
`benchmark'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:124:in 
`apply_catalog'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:192:in 
`run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block 
(4 levels) in run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in 
`lock'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:44:in `block 
(3 levels) in run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:114:in 
`with_client'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block 
(2 levels) in run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `block 
in run_in_fork'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:81:in `fork'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:81:in 
`run_in_fork'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:40:in `block 
in run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in 
`call'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in 
`controlled_run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/agent.rb:38:in `run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/daemon.rb:163:in 
`block in run_event_loop'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/job.rb:49:in `call'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/job.rb:49:in `run'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/scheduler.rb:39:in `block in 
run_ready'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/scheduler.rb:34:in `each'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/scheduler.rb:34:in `run_ready'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/scheduler/scheduler.rb:11:in `run_loop'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/daemon.rb:179:in 
`run_event_loop'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/daemon.rb:142:in 
`start'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:377:in `main'
puppet-agent[28934]: 
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:323:in `run_command'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in 
`block (2 levels) in run'
puppet-agent[28934]: /usr/lib/ruby/vendor_ruby/puppet/application.rb:470:in 
`plugin_hook'
puppet-agent[28934]: 

[Puppet Users] ignoring changes to a file

2014-03-05 Thread kaustubh chaudhari
Hi All,

One of my application requires me to copy a config file after installation 
the application. This needs to be done only once after installation

However this config file is managed by a central server and keeps on 
getting updated every day, which means puppet will overwrite the updated 
file every day.
Which is a problem.

How can i configure puppet to ignore changes to this file. Is there a way 
to do this ?

Any help is appreciated!

-Kaustubh

-- 
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/b6917248-fe5d-45f4-b587-a40c85f34d7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] munin service wont' star

2014-03-05 Thread jcbollinger


On Tuesday, March 4, 2014 9:56:33 AM UTC-6, Jose Luis Ledesma wrote:




 On Tue, Mar 4, 2014 at 3:36 PM, jcbollinger 
 john.bo...@stjude.orgjavascript:
  wrote:



 On Tuesday, March 4, 2014 1:30:44 AM UTC-6, Jose Luis Ledesma wrote:

 Although it is not incorrect, you should not bypass class boundaries, so 
 it's better:

 require=Class['munin::install']


 Well, that's one school of thought.  Personally, I don't have any problem 
 with cross-class relationships within the same module, as the OP's appears 
 to be.  In fact, I'd be willing to accept any cross-class relationship at 
 all, provided that the class and module of the relationship target 
 *document* the target as being declared by the module and available for 
 such use.  (But no one does that.)

  


 Perhaps it is, but I found it very useful when in the install class 
 you have to install more than one package, if you set up the require 
 against the install Class you don't have to care anymore about it.
  



That's in no way inconsistent with what I said.  The central issues here 
for me are 

   1. using an appropriate level of precision in your declarations, and
   2. public *vs*. private characteristics of modules.
   
Using an appropriate level of precision does not necessarily mean the 
issuing the narrowest and most precise relationship declarations possible.  
You can be too specific, thereby making your manifest set brittle and 
making its maintenance more costly.  You can also be too general, however, 
thereby increasing your exposure to relationship cycles and making Puppet 
work harder to order resources.

How, then, should one find the best balance?  That's where the public vs. 
private distinction enters the picture.  Puppet DSL does not enforce any 
encapsulation, but I consider it a best practice to consider undocumented 
features of a module to be private to that module, whereas documented 
features are public (unless the documentation specifically says 
otherwise).  If the module author makes a module feature -- a class, a 
definition, a declared resource, a variable -- public by documenting it 
then he is making a commitment to keeping that feature present and 
consistent with the documentation, and also to document when the feature 
nevertheless is changed or removed.  Therefore, relying only on public 
module features minimizes maintenance risk.

Among public features of a module, however, one should choose the most 
specific relationship targets consistent with the purpose of the 
relationship.  If one really cares only about a specific Package, say, 
whose declaration is a public module feature, then that's where one should 
point their relationship.  If what one really wants, on the other hand, is 
all the packages required for Foo to work then it is probably more 
appropriate to point your relationship at some class.

The same logic applies inside a module, but although it seems common in the 
community to take the Puppet class as a subunit of modularity, I think 
that's mainly another unwarranted holdover from OO-think.  Individual 
classes in a multi-class Puppet module are rarely independent units in the 
sense that applies to well-designed classes in an OO programming language.  
In Puppet, that level of unity typically applies only to modules.  Thus, 
within one module I consider all classes and resources fair game for 
relationships.  That doesn't mean that in any given case it's necessarily a 
good idea to point a relationship at a resource declared by a different 
class in the same module, but sometimes that is the best thing to do.  A 
flat rule against doing so is needlessly restrictive.


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/63418eee-604c-468c-a680-65138be280a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: ignoring changes to a file

2014-03-05 Thread Alexander Fortin
On Wednesday, March 5, 2014 3:41:45 PM UTC+1, kaustubh chaudhari wrote:

 Hi All,

 One of my application requires me to copy a config file after installation 
 the application. This needs to be done only once after installation

 However this config file is managed by a central server and keeps on 
 getting updated every day, which means puppet will overwrite the updated 
 file every day.
 Which is a problem.

 How can i configure puppet to ignore changes to this file. Is there a way 
 to do this ?


http://docs.puppetlabs.com/references/3.stable/type.html#file-attribute-replace

Whether to replace a file or symlink that already exists on the local 
system but whose content doesn’t match what the source or content attribute 
specifies. Setting this to false allows file resources to initialize files 
without overwriting future changes. Note that this only affects content; 
Puppet will still manage ownership and permissions. Defaults to true.

Valid values are true, false, yes, no

-- 
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/231aae69-f70c-43a6-b342-40b33fdf55ca%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Caught Encoding::CompatibilityError

2014-03-05 Thread Andrew Langhorn
Hi,

I have a Puppet repository using Hiera as a lightweight ENC rather than the 
more traditional init.pp script in the manifests directory. When using 
Vagrant to test my commits work fine before opening a pull request, I've 
encountered the following:

*Error: Could not parse for environment production: Caught 
Encoding::CompatibilityError: incompatible encoding regexp match 
(ASCII-8BIT regexp with UTF-8 string) at 
/tmp/vagrant-puppet-1/manifests/site.pp:2 on node0*

The file - site.pp - only contains one line...

*vagrant ssh node0 -c 'cat -A /tmp/vagrant-puppet-1/manifests/site.pp'*
*import 'nodes'$*

...and looks fine to me, so I've no idea where it's getting line 2 from. 

The file - site.pp - is encoded with the us-ascii charset:

*vagrant ssh node0 -c 'file --mime /tmp/vagrant-puppet-1/manifests/site.pp'*
*/tmp/vagrant-puppet-1/manifests/site.pp: text/plain; charset=us-ascii*

For completeness, nodes.pp is also encoded in us-ascii, and contains:

*vagrant ssh node0 -c 'cat -A /tmp/vagrant-puppet-1/manifests/nodes.pp'*
*# Use hiera as a lightweight ENC.$*
*node default {$*
*  hiera_include('classes')$*
*}$*

I'm running Ruby 1.9.3 locally, and 1.9.2p290 (2011-07-09 revision 32553) 
[x86_64-linux] on the Vagrant host (Ubuntu 12.04 'Precise Pangolin').

I'm a bit stuck - can anyone help?

Thanks in advance,

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/5a177d38-cb4e-465f-9dd7-9ac9e57c7e16%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] How puppet install another version of the same package.

2014-03-05 Thread Flamarion Jorge
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

I have same problem and my workaround, until discovery solution,has
been to use a exec function and run yum command.

This works for me.

Flamarion Jorge

Em 05/03/14 03:42, shlo.af...@gmail.com escreveu:
 
 
 Hi I want to install same package with a 2 different version like:
 
 libstdc++-4.4.7-3.el6.i686 libstdc++-4.4.7-3.el6.x86_64
 
 
 I put it in puppet init file and when I run puppet I get:
 
 err: /Package[libstdc++]/ensure: change from 4.4.7-3.el6 to 
 4.4.7-4.el6.i686 failed: Could not update: Execution of 
 '/usr/bin/yum -d 0 -e 0 -y install libstdc++-4.4.7-4.el6.i686' 
 returned 1: Error:  Multilib version problems found. This often 
 means that the root cause is something else and multilib version 
 checking is just pointing out that there is a problem.
 
 
 I have libstdc++-4.4.7-3.el6.x86_64 installed already. When I run
 yum from the command like it run okay and install both version. 
 What I can do to make puppet install it too.
 
 Thanks.
 
 -- You received this message because you are subscribed to the
 Google Groups Puppet Users group. To unsubscribe from this group
 and stop receiving emails from it, send an email to
 puppet-users+unsubscr...@googlegroups.com 
 mailto:puppet-users+unsubscr...@googlegroups.com. To view this
 discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/c2318c1f-25a9-442d-867e-336ebd5aeceb%40googlegroups.com

 
https://groups.google.com/d/msgid/puppet-users/c2318c1f-25a9-442d-867e-336ebd5aeceb%40googlegroups.com?utm_medium=emailutm_source=footer.
 For more options, visit https://groups.google.com/groups/opt_out.
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTFvzXAAoJEJhPZF0zwv0zn2sP/iaoowsgzbewTQfF3Wlt0kj1
6TxXGgmGo8Gy6AaLC2pmPj484WYUEbSgJkbA3Rbj5caqdLNiJzZ2EdtF5PAWY+tt
7OGwMaANETL52mgopJ+ApEIPw2pBY04NV4yfKSwhz8aN3jG2W2AnyCYvn9D+4feT
lvDcycZQ9wW0UbRzq8UQ1nEWwwJcaDzbnBpE2C4yMRwiNr1tpjTCmP4T5M9YRY3h
ptrlCcCEWahF3RscbQqHG5M+vFS5JKZmfSiqBNNRE/s4EWKDN1i2kKCz3bLmoRt+
Dy/Sf0eD7mBeU4LqU1BDO6cvxXQJKMDHBe7RsqtNJYdV42ibzNupuA8ZB0X418PH
73aLWVzeiWJ46+utfFOSL//wntNDbCWfaH3w6sKulWoXjfHdk7hO1JLIwk84kKaU
RuWx2PAaLo1Jn9aWshfpWybgYRdFASMqWdf4/ZeG9FaBv4RuHN3P6IOJB1Bks+zf
fbHR3TnpTTjjRTWRnq04eOVkNe0EJSfYtJ2OwCGU4pWUARDi3CVKGZuPin85k/i5
7hQ5ESJMH6MERbcnHFP1T7jYgBG7d7g/sLaqLt+S5xq6YYefak6ZSa+Qt5EX81iI
1QIhNgX+FfRnLSyAJwiezGpbTDSzESNtjWvAG2vjGZNVYDiNHjs/Yj35JkhiXeKl
y8inW+s7zvhWyW0GVA6I
=OVro
-END PGP SIGNATURE-

-- 
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/5316FCD7.7080901%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Disable SSL when compiling catalogs for testing purposes

2014-03-05 Thread Alexander Fortin
Hi folks,

recently in our Puppet pipeline we added a few tests on catalogs
leveraging Ripienaar's puppet-catalog-diff [1]. Basically, before
merging to production, for each node we compare the catalogs between
production and the committed developing version, to spot any (maybe
unwanted) change before the agent run. Also, we run catalog diffs for
a single node locally in a Docker container to help refactoring-like
tasks, and to test with different versions of puppet too (still at
v2.7, will upgrade to 3 hopefully very soon).

This has been working quite well for us so far, but of course will be
nice to reduce the amount of time needed to run those tests. I know
very little about the puppet master process, but my understanding is
that every time we create the catalog, i.e. running

puppet master --compile myhost

this will also create a SSL cert for myhost. Is there a way to disable
this behavior? Any other suggestions about how to make this catalog
creation process as lightweight as possible?

-- 
https://www.vizify.com/alexander-fortin

-- 
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/CAEoqoki-PT16v_Nqo7_%3DL-vXBv7LMu7X_vgZXQssaJ%2B3BQ29ew%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet Enterprise 3.2 now available

2014-03-05 Thread Bas Neve
Well unfortunately my installscript hung...


https://lh6.googleusercontent.com/-R9b_ZjBHX60/UxcB7zcfC-I/Beg/oZBnf4MjDEQ/s1600/Hanging+install+script.png




Op dinsdag 4 maart 2014 17:04:56 UTC+1 schreef Eric Sorenson:

 Hello puppet-users, 

 We're pleased to announce that Puppet Enterprise 3.2 is immediately 
 available for download: http://puppetlabs.com/misc/pe-files/

 http://puppetlabs.com/misc/pe-files/

 New in this release is the first set of Puppet Enterprise supported 
 moduleshttp://forge.puppetlabs.com/supported?utm_campaign=pe32utm_medium=emailutm_source=announceutm_content=forge_supported—
  all rigorously tested and validated by our engineers to ensure they 
 perform reliably in production environments with ongoing support from 
 Puppet Labs. These supported modules get you up and running faster on 
 Puppet Enterprise without the need to write Puppet code, letting you 
 automate the management of common tasks including: Apache, MySQL, NTP, 
 PostgreSQL and Windows registry.

 Additional new capabilities in Puppet Enterprise 3.2 include:

 * Simplified agent install: Reduce the time and complexity of deploying 
 and upgrading puppet agents by leveraging native OS packaging systems, 
 saving you several minutes per node.

 * Tech preview of Razor: Get early access to Razor — a next-generation 
 bare metal provisioning capability — and provide feedback to influence 
 future enhancements.

 * Non-root agent access: Extend Puppet Enterprise beyond infrastructure 
 teams to users without root privileges, such as app developers and DBAs.

 * Oracle Solaris 11 support: Puppet Enterprise 3.2 adds Oracle Solaris 11 
 to existing support for enterprise platforms, including Windows, AIX, RHEL, 
 Ubuntu and more. 

 Get a full overview of all of the new Puppet Enterprise capabilities here:

 http://www.puppetlabs.com/blog/puppet-enterprise-3.2-extending-automation 
 http://puppetlabs.com/puppet/whats-new/

 http://puppetlabs.com/puppet/whats-new/

 Or review the docs here:

 https://docs.puppetlabs.com/pe/3.2/ https://docs.puppetlabs.com/pe/3.1/

 Want to see Puppet Enterprise 3.2 in action? Attend a 30-minute, live 
 technical webinar on Thursday, March 6th. Register today: 
 https://cc.readytalk.com/r/206nmq0r2aaaeom 



-- 
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/e4f4584a-039d-4237-b547-5576414246db%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Syntax for echoing Fqdn name inside a hash value (please help)

2014-03-05 Thread jcbollinger


On Tuesday, March 4, 2014 3:56:48 PM UTC-6, Virtual_user wrote:


 Hi 
 i am using puppet 2.7

 i want to echo  the Fqdn name in a template by using looping through the 
 hash, 

 Example, in site.pp i have

 $acc_sudo = $mc_servertype ? {
 'system' = [ '%APP *%= fqdn %* =/etc/init.d/httpd start, 
 /etc/init.d/httpd stop,/etc/init.d/httpd restart, /sbin/services httpd 
 restart' ],
 'db' = [ '%DB %= fqdn % =/etc/init.d/oracle start'],
 'app' = ['%APP %= fqdn % =/etc/init.d/httpd start, 
 /etc/init.d/httpd stop,/etc/init.d/httpd restart, /sbin/services httpd 
 restart' ],

 }



There is no hash there.  You are using a Puppet language feature called a 
selector to assign a value to variable $acc_sudo based on the value of 
variable $mc_servertype.  (Which value, by the way, is in each case an 
array containing exactly one string.  Weird.)

 



 and sudo.erb file i have 

 % if mc_servertype == system %

 % acc_sudo.each do |sudo| %%= sudo %% end %

 % end %

 problem is, when its generating the sudo file, its  writing like this 

 %APP*%= fqdn %*=/etc/init.d/httpd start, /etc/init.d/httpd 
 stop,/etc/init.d/httpd restart, /sbin/services httpd restart



Of course it does.  Each element of variable acc_sudo is a string.  Your 
template says to insert that string into the result, not to interpret it as 
another template.

 


 but i want to make it like this

 %APPserver1.test.co=/etc/init.d/httpd start, /etc/init.d/httpd 
 stop,/etc/init.d/httpd restart, /sbin/services httpd restart


 what will be the right syntax for it in site.pp ??



You are making it harder than it needs to be.  What you are after can be 
accomplished with ordinary variable interpolation:

$acc_sudo = $mc_servertype ? {
'system' = [ %APP ${fqdn} =/etc/init.d/httpd start, 
/etc/init.d/httpd stop,/etc/init.d/httpd restart, /sbin/services httpd 
restart ],
'db' = [ %DB ${fqdn} =/etc/init.d/oracle start ],
'app' = [ %APP ${fqdn} =/etc/init.d/httpd start, 
/etc/init.d/httpd stop,/etc/init.d/httpd restart, /sbin/services httpd 
restart ],
}

Note there that (1) the variable interpolation is performed when the string 
is initialized, as opposed to when the template is processed, and (2) 
variables are interpolated into double-quoted strings only, not into 
single-quoted strings.


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/7cb1adc5-6e02-43ca-850e-c460fcf1ac11%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ignoring changes to a file

2014-03-05 Thread Thomas Müller
On Wed, 05 Mar 2014 06:41:45 -0800 wrote kaustubh chaudhari:


 One of my application requires me to copy a config file after
 installation the application. This needs to be done only once after
 installation
 
 However this config file is managed by a central server and keeps on
 getting updated every day, which means puppet will overwrite the updated
 file every day.
 Which is a problem.

if the config file does not exist, you can use the replace parameter of 
the file type. 

http://docs.puppetlabs.com/references/latest/type.html#file-attribute-
replace


- Thomas

-- 
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/lf7eb3%24ns4%241%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Monitoring an apache/passenger puppetmaster setup?

2014-03-05 Thread Christopher Wood
How do you monitor your apache/passenger-fronted puppetmaster to find out when 
it's down?

As backstory, we have a chaos monkey sort of cron job randomly kill-9'ing 
random processes and monit checking services to make sure they stay up. (Sadly 
the chaos monkey part probably won't make it into production.)

The puppet agent seems to exit with a 0 status in some circumstances where the 
puppetmaster isn't working, therefore doing a test noop agent run doesn't help. 
So far the only way I've figured out to check if my puppetmaster service is 
purportedly functioning is:

[root@cwt1 ~]# cat /usr/local/sbin/monit-check-passenger 
#!/bin/bash
exit `curl -k -s https://localhost:8140 | grep '500 Internal Server Error' | wc 
-l`

Unfortunately the above gives me one of these in my syslog each minute, which 
is harmless yet still ugly:

Mar  5 10:21:42 cwt1 puppet-master[32167]: The environment must be purely 
alphanumeric, not ''

I'm interested in a puppetmaster monitoring solution which doesn't give me log 
oddities.

-- 
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/20140305152914.GA29143%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ignoring changes to a file

2014-03-05 Thread kaustubh chaudhari
Thanks Alexzender and Thomas for the reply.

This is partially useful.

The requirement is i need to copy it first basically overwrite it once and 
then ignore all the changes.

Any clue how this can be achieved! 



 5, 2014 10:02:59 AM UTC-5, Thomas Müller wrote:

 On Wed, 05 Mar 2014 06:41:45 -0800 wrote kaustubh chaudhari: 


  One of my application requires me to copy a config file after 
  installation the application. This needs to be done only once after 
  installation 
  
  However this config file is managed by a central server and keeps on 
  getting updated every day, which means puppet will overwrite the updated 
  file every day. 
  Which is a problem. 

 if the config file does not exist, you can use the replace parameter of 
 the file type. 

 http://docs.puppetlabs.com/references/latest/type.html#file-attribute- 
 replace 


 - Thomas 



-- 
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/ac04d01a-81e2-401f-be56-47583aa20d52%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppet applying wrong/old configuration to client

2014-03-05 Thread jcbollinger


On Tuesday, March 4, 2014 4:07:26 AM UTC-6, Denny wrote:

 Hi all,

 I'm pretty new to puppet and couldn't find any solution yet.

 Right now I have seven hosts managed via puppet. Four of them are kinda 
 broken since yesterday. They are using an old/cached(?) configuration.

 My current node definition looks like:

 node /^host\d+\.domain\.local$/ {
   include nrpe
   include bashrc
   include motd
   include crontab
   include anacrontab
   class { 'yum':
 extrarepo = [ 'epel', 'puppetlabs' ],
   }
   class { 'resolv_conf':
 searchpath  = 'domain.local',
 nameservers = [ '1.2.3.4', '1.2.3.5' ],
   }
   class { 'rsyslog':
 syslogserver = 'graylog.domain.local',
 syslogport   = '12501',
   }
 }

 Actually my node is applying an old definition (with ntp and postfix, 
 which I removed for testing purposes):



That your ntp and postfix classes are still being applied is not a sure 
sign that your nodes are using stale catalogs.  Even though those classes 
are no longer declared directly in your node block, it could be that one or 
more of the classes you do declare in turn declare them.

You could test the freshness of your catalog via a Puppet version of the 
tried and true print statement debugging technique.  For example, add 
this to your node block:

notify { 'freshness message':
  message = 'This is version 42 of site.pp'
}
 
If the agent gets a fresh catalog then it will include that resource, which 
will cause the specified message to be emitted into the agent's log 
output.  Otherwise, not.



 root@host01 /var/lib/puppet # /etc/init.d/ntpd stop
 Shutting down ntpd:[  OK  ]
 root@host01 /var/lib/puppet # rm /etc/postfix/main.cf
 rm: remove regular file `/etc/postfix/main.cf'? y
 root@host01 /var/lib/puppet # puppet agent --test



In general, you might find it useful to specify the --debug flag as well to 
enable more detailed log output when you are troubleshooting.  That isn't 
necessary to get the Notify's output, however.


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/09a9a5d5-0930-42aa-b1f1-8ec0c8c75097%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] How to check if a service Or a Package exists

2014-03-05 Thread kaustubh chaudhari
Hi All,

I need to check if a service or a package is already installed before 
running the further code.

Eg:

Install bigfix package if bigfix service dose not exist.

i know ensure = true will do this, but there is a possibility that bigfix 
was installed from the source in c:\bigfix on few server and on few its 
installed as a msi and i can see it under add remove programs.

So the best way is to check if the bigfix service exists or not, if exist 
ignore if not install via puppet.

Any pointers ?

-Kaustubh

-- 
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/e3040275-e4d9-46b2-bc01-386204d670e6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ignoring changes to a file

2014-03-05 Thread Thomas Müller
On Wed, 05 Mar 2014 07:32:59 -0800 wrote kaustubh chaudhari:

 Thanks Alexzender and Thomas for the reply.
 
 This is partially useful.
 
 The requirement is i need to copy it first basically overwrite it once
 and then ignore all the changes.
 
 Any clue how this can be achieved!

create the config file before the application installation creates it. if 
its an rpm installation, the file will not be overwritten. 



-- 
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/lf7grs%24ns4%242%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet 2.6.18 Automodule loading - Wrong number of Arguments (1 for 2)

2014-03-05 Thread jcbollinger


On Tuesday, March 4, 2014 4:08:16 AM UTC-6, Michel Vocks wrote:

 Dear Puppet-Users,

 I'm currently stucking at a wired error message.
 Below I've posted all important output.
 When I run this configuration on the same machine or on an client I geht 
 the following error:
 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 wrong number of arguments (1 for 2) at /etc/puppet/manifests/site.pp:2



I've never seen that one, and I don't see anything in your manifests to 
explain it.  I wonder whether you have a custom function named 'test', or 
whether there is an undocumented built-in one by that name.  If so, then 
changing the name of your class should fix the problem.
 



 [code]
 puppet@de-dussmon2:/etc/puppet/manifests puppet --version
 2.6.18
 [/code]



Since you are just starting with Puppet, though, I would strongly 
recommend, that you work with a supported version.  You probably want the 
latest, version 3.4.3.  If for some reason you need a version in the Puppet 
2 series, then go with 2.7.25.  (Those are the latest open-source versions; 
PE has its own version numbering.)  Since you appear to have a mind for 
managing Windows clients, you should be advised that Puppet 3's Windows 
support is *far* superior to Puppet 2's


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/c895b7b6-52e7-4705-a85f-6a621ed8c82a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Possible to get just the keys out of a hiera hash?

2014-03-05 Thread Kenton Brede
So in hiera I've got:

users_common:
user1:
ensure: present
home: /home/user1
managehome: true
user2:
ensure: present
home: /home/user2
managehome: true

I'm using users_common with a create_resources in one class but I'd like
to just pull out user1, user2 into an array from users_common for a
different class.

Is this possible?

Something like:

$users_c = hiera('users_common')
$users = ${users_c['keys']}
notify { ${users}: }

Thanks,

-- 
Kent

-- 
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%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ignoring changes to a file

2014-03-05 Thread kaustubh chaudhari
Hey Thomas,


Thats the tricky part! The location where i want to copy this file is 
created by setup. Its a windows application.

So i will have to copy the file(overwrite) it after the package 
installation and than ignore any changes to that file.
Thats where i am stuck!

-Kaustubh

On Wednesday, March 5, 2014 10:46:04 AM UTC-5, Thomas Müller wrote:

 On Wed, 05 Mar 2014 07:32:59 -0800 wrote kaustubh chaudhari: 

  Thanks Alexzender and Thomas for the reply. 
  
  This is partially useful. 
  
  The requirement is i need to copy it first basically overwrite it once 
  and then ignore all the changes. 
  
  Any clue how this can be achieved! 

 create the config file before the application installation creates it. if 
 its an rpm installation, the file will not be overwritten. 





-- 
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/96b689bb-0f34-43e4-a200-1417b612742a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Possible to get just the keys out of a hiera hash?

2014-03-05 Thread Robin Bowes
Have a look in stdlib for the keys function.

R.


On 5 March 2014 15:56, Kenton Brede kbr...@gmail.com wrote:

 So in hiera I've got:

 users_common:
 user1:
 ensure: present
 home: /home/user1
 managehome: true
 user2:
 ensure: present
 home: /home/user2
 managehome: true

 I'm using users_common with a create_resources in one class but I'd like
 to just pull out user1, user2 into an array from users_common for a
 different class.

 Is this possible?

 Something like:

 $users_c = hiera('users_common')
 $users = ${users_c['keys']}
 notify { ${users}: }

 Thanks,

 --
 Kent



  --
 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%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CA%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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/CAJGKfwBua4tAsioMYT6SGb4FdD-scxFCgpHHeDjUxQJzT2XEhw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] ignoring changes to a file

2014-03-05 Thread Thomas Müller
On Wed, 05 Mar 2014 07:57:18 -0800 wrote kaustubh chaudhari:

 Hey Thomas,
 
 
 Thats the tricky part! The location where i want to copy this file is
 created by setup. Its a windows application.
 
 So i will have to copy the file(overwrite) it after the package
 installation and than ignore any changes to that file.
 Thats where i am stuck!

ugly workaround:

- copy the config-file with a added .puppet suffix.
- create an Exec with refreshonly = true which copies this file to the 
correct location
- create another empty file which notifies the Exec




- Thomas

-- 
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/lf7ieb%24o3a%241%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppetlabs-mysql module still doesn't properly support $datadir?

2014-03-05 Thread Matt W
It seems like this has been an issue in the past 
(https://github.com/puppetlabs/puppetlabs-mysql/issues/228, 
https://groups.google.com/forum/#!searchin/puppet-users/mysql/puppet-users/mkQygmpa610/bXIslE9EG4cJ),
 
but I'm not sure its fixed yet. Can anyone show me some demonstration 
puppet code that will install MySQL and configure it to use /mnt/mysql 
instead of /var/lib/mysql? Nothing I seem to try works -- the MySQL daemon 
continues to start up and use /var/lib/mysql. 

The simplest thing that should have worked, I think, is:

node foo {
   file { '/mnt/mysql':
 ensure = directory,
 owner = 'mysql',
 group  = 'mysql',
 notify = Class['mysql::server::service'];
   }
   class { '::mysql::server':
 override_options = {
   'mysqld' = { 'datadir' = '/mnt/mysql', },
 },
 require  = File[$datadir];
   }
   mysql::db { 'foo': }
 }


This did create the /mnt/mysql directory, but mysqld still started up using 
/var/lib/mysql... even though my.cnf clearly pointed to /mnt/mysql.

Ideas?

-- 
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/cd589484-8306-4f31-aa25-f138fc59584e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: setting up class default values

2014-03-05 Thread Tim Dunphy

 My best translation of your apparent intent into effective Puppet code
 would be this:
 Class['postfix::install'] - Class['postfix::config']
 Class['postfix::config'] ~ Class['postfix::service']
 .  That which can be shortened to this:
 Class['postfix::install'] - Class['postfix::config'] ~
 Class['postfix::service']


Excellent info!  I'll give that a shot. I forgot about chaining the way you
demonstrate. I look forward to putting this into practice. Thank you!

Tim


On Wed, Mar 5, 2014 at 10:17 AM, jcbollinger john.bollin...@stjude.orgwrote:



 On Tuesday, March 4, 2014 11:17:48 AM UTC-6, bluethundr wrote:

 Hey all,

  I'm attempting to setup some defaults to my postfix 'config' class to
 require a package and request a refresh of the postfix service.

 This is my class definition:

 class postfix::config {
$require = Class[postfix::install]
$notify = Class[postfix::service]

File {
   owner = postfix,
   group = postfix,
   mode = 0644,
 }

file {  /etc/postfix/master.cf:
 ensure = present,
 source = puppet:///modules/postfix/master.cf,
 }

file { /etc/postfix/main.cf:
  ensure = present,
  content = template(postfix/main.cf.erb),
 }
 }


 But I notice that if I create a situation where the service _should_ be
 refreshed (like by moving the main.cf file out of the way and doing a
 puppet run) the service is not cycled.

 Can anyone point out where I'm going wrong with my syntax in this class
 definition?



 You are initializing class variables $postfix::config::require and
 $postfix::config::notify with class references, but that has no special
 meaning to Puppet.  In particular, those class variables are not related to
 the 'require' and 'notify' metaparameters that all classes and resources
 provide (and if they were then you wouldn't be able to assign values to
 them inside the class body).

 My best translation of your apparent intent into effective Puppet code
 would be this:

 Class['postfix::install'] - Class['postfix::config']
 Class['postfix::config'] ~ Class['postfix::service']

 .  That which can be shortened to this:

 Class['postfix::install'] - Class['postfix::config'] ~
 Class['postfix::service']

 Put one of those in your class in place of the variable declarations, or
 else pull it up to a higher level (e.g. in class 'postfix', if that exists
 and can be assumed to have been declared).


 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/bdafaa29-09cf-44d4-9236-409e729c0e9f%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/bdafaa29-09cf-44d4-9236-409e729c0e9f%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

-- 
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/CAOZy0e%3DAKFTF0bnj0NgiDbn%2BvqKM4NYXiksOOLcR_cfpzAQonA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Possible to get just the keys out of a hiera hash?

2014-03-05 Thread Kenton Brede
Works great! -- Thanks.


On Wed, Mar 5, 2014 at 10:03 AM, Robin Bowes robin.bo...@yo61.com wrote:

 Have a look in stdlib for the keys function.

 R.


 On 5 March 2014 15:56, Kenton Brede kbr...@gmail.com wrote:

 So in hiera I've got:

 users_common:
 user1:
 ensure: present
 home: /home/user1
 managehome: true
 user2:
 ensure: present
 home: /home/user2
 managehome: true

 I'm using users_common with a create_resources in one class but I'd
 like to just pull out user1, user2 into an array from users_common for
 a different class.

 Is this possible?

 Something like:

 $users_c = hiera('users_common')
 $users = ${users_c['keys']}
 notify { ${users}: }

 Thanks,

 --
 Kent



  --
 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%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CA%2BnSE3-yW2XYU5V7-hwKkuydGpAnHcW7bJW6XUwmMhpon%2BjDiA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.


  --
 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/CAJGKfwBua4tAsioMYT6SGb4FdD-scxFCgpHHeDjUxQJzT2XEhw%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-users/CAJGKfwBua4tAsioMYT6SGb4FdD-scxFCgpHHeDjUxQJzT2XEhw%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Kent Brede

-- 
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%2BnSE381sVwZU%2BHgsYOOsTb0%3DFT3ZnAnmnSQTRcHB0ZqACpS9A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Windows: Can't create/update file in user's home directory using template

2014-03-05 Thread Rob Reynolds
Thanks, I updated the issue name to help some for future searching.


On Wed, Mar 5, 2014 at 12:14 AM, Dirk Heinrichs d...@recommind.com wrote:

  Am 05.03.2014 01:14, schrieb Rob Reynolds:

  This appears to be PUP-1389[1]. We've fixed a found issue with Windows
 2012 and ruby and how they handle the double line terminator. Note that the
 description is somewhat misleading, this can happen with any file name.
 We've fixed the issue, you will want to evaluate 3.4.3 to get it. This bug
 became more prominent once we applied a CVE fix for 3.4.1.


 Yes, updating to 3.4.3 fixes the problem.

 The description of PUP-1389 was indeed misleading as I checked the release
 notes before posting to the list and found that none of the fixed issues
 seemed to apply to my problem. Thanks for pointing me into the right
 direction.

 BTW: I had this problem on Windows Server 2008R2.

 Bye...


 Dirk
 --

 *Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
 *Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
 *Tel*: +49 2226 159 (Ansage) 1149
 *Email*: d...@recommind.com
 *Skype*: dirk.heinrichs.recommind
 www.recommind.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/5316DCE8.9040507%40recommind.comhttps://groups.google.com/d/msgid/puppet-users/5316DCE8.9040507%40recommind.com?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014, September 23-24 in San Francisco - *
http://bit.ly/pupconf14
Register now and save $350!

-- 
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/CAMJiBK6b5eq0bvGS-3STnoLrnjd8J_mupyOP73U0qAY1r2pkMw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
inline: Logo.gif

Re: [Puppet Users] munin service wont' star

2014-03-05 Thread José Luis Ledesma
Well, it is not an unbreakable rule, but from my point referencing
individual resources from another class is a source  of possible future
problems.

In a simple module like the OP seems to expose, that is:
Params
Config
Install
Service

If you reference individual resources from another class will probably mean:
1. Make it difficult to read/understand for other people
2. Implenting this module for another Linux flavour will be harder
(package/service name changes and so on)
3. Modifying it to add some other package/service/configuration will be
harder too.

Point 2 and 3 also means possible undesired behaviors.

Just my point of view...

P.n. it is really a pleasure read all of your posts
El 05/03/2014 15:49, jcbollinger john.bollin...@stjude.org escribió:



 On Tuesday, March 4, 2014 9:56:33 AM UTC-6, Jose Luis Ledesma wrote:




 On Tue, Mar 4, 2014 at 3:36 PM, jcbollinger john.bo...@stjude.orgwrote:



 On Tuesday, March 4, 2014 1:30:44 AM UTC-6, Jose Luis Ledesma wrote:

 Although it is not incorrect, you should not bypass class boundaries,
 so it's better:

 require=Class['munin::install']


 Well, that's one school of thought.  Personally, I don't have any
 problem with cross-class relationships within the same module, as the OP's
 appears to be.  In fact, I'd be willing to accept any cross-class
 relationship at all, provided that the class and module of the relationship
 target *document* the target as being declared by the module and
 available for such use.  (But no one does that.)




 Perhaps it is, but I found it very useful when in the install class
 you have to install more than one package, if you set up the require
 against the install Class you don't have to care anymore about it.




 That's in no way inconsistent with what I said.  The central issues here
 for me are

1. using an appropriate level of precision in your declarations, and
2. public *vs*. private characteristics of modules.

 Using an appropriate level of precision does not necessarily mean the
 issuing the narrowest and most precise relationship declarations possible.
 You can be too specific, thereby making your manifest set brittle and
 making its maintenance more costly.  You can also be too general, however,
 thereby increasing your exposure to relationship cycles and making Puppet
 work harder to order resources.

 How, then, should one find the best balance?  That's where the public vs.
 private distinction enters the picture.  Puppet DSL does not enforce any
 encapsulation, but I consider it a best practice to consider undocumented
 features of a module to be private to that module, whereas documented
 features are public (unless the documentation specifically says
 otherwise).  If the module author makes a module feature -- a class, a
 definition, a declared resource, a variable -- public by documenting it
 then he is making a commitment to keeping that feature present and
 consistent with the documentation, and also to document when the feature
 nevertheless is changed or removed.  Therefore, relying only on public
 module features minimizes maintenance risk.

 Among public features of a module, however, one should choose the most
 specific relationship targets consistent with the purpose of the
 relationship.  If one really cares only about a specific Package, say,
 whose declaration is a public module feature, then that's where one should
 point their relationship.  If what one really wants, on the other hand, is
 all the packages required for Foo to work then it is probably more
 appropriate to point your relationship at some class.

 The same logic applies inside a module, but although it seems common in
 the community to take the Puppet class as a subunit of modularity, I think
 that's mainly another unwarranted holdover from OO-think.  Individual
 classes in a multi-class Puppet module are rarely independent units in the
 sense that applies to well-designed classes in an OO programming language.
 In Puppet, that level of unity typically applies only to modules.  Thus,
 within one module I consider all classes and resources fair game for
 relationships.  That doesn't mean that in any given case it's necessarily a
 good idea to point a relationship at a resource declared by a different
 class in the same module, but sometimes that is the best thing to do.  A
 flat rule against doing so is needlessly restrictive.


 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/63418eee-604c-468c-a680-65138be280a4%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/63418eee-604c-468c-a680-65138be280a4%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 

[Puppet Users] Re: Disable SSL when compiling catalogs for testing purposes

2014-03-05 Thread jcbollinger


On Wednesday, March 5, 2014 8:35:40 AM UTC-6, Alexander Fortin wrote:

 [...] my understanding is 
 that every time we create the catalog, i.e. running 

 puppet master --compile myhost 

 this will also create a SSL cert for myhost.



I can't say for certain that you're wrong, but I have never heard of that 
certificate-generating behavior.  From whence comes your understanding?

Even if Puppet were doing that, I think you would find the savings 
available from eliminating it to be negligible compared to the cost of the 
actual catalog compilation.


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/7d2ab4b4-37f6-4ff9-80b7-9ab6038efa73%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Windows 2012 R2 out-of-sync / not checking in?

2014-03-05 Thread Nick Hobart
The issue was in fact the user. I was running as my user account and that 
was conflicting with the system service account. Details here: 

https://ask.puppetlabs.com/question/5580/windows-2012-r2-not-checking-in/

On Tuesday, March 4, 2014 6:09:32 PM UTC-6, Rob Reynolds wrote:

 What user is puppet agent service running under on your machine? 


 On Mon, Mar 3, 2014 at 8:38 AM, Nick Hobart nickh...@gmail.comjavascript:
  wrote:

 I'm standing up a Foreman front end for open source Puppet server. Every 
 Linux box seems to be working and checking in just fine. The problem child 
 is Windows 2012 R2. I can manually trigger an update with:

  puppet agent --test

 However, if I just let it sit there, it'll never check back in. Any clues 
 as to what's going on? I'm using Puppet 3.4.3 on the agent and server. 
 Thanks. Here's the imgur link. 

 http://imgur.com/aUutqdt
  
 -- 
 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/d1c69a97-0a88-45db-9bfa-7602889a39f9%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Rob Reynolds
 Developer, Puppet Labs

 *Join us at PuppetConf 2014, September 23-24 in San Francisco - *
 http://bit.ly/pupconf14
 Register now and save $350!
  

-- 
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/f964c334-f1ff-4213-9a4f-fafc7f2a648c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: How to check if a service Or a Package exists

2014-03-05 Thread jcbollinger


On Wednesday, March 5, 2014 9:40:48 AM UTC-6, kaustubh chaudhari wrote:

 Hi All,

 I need to check if a service or a package is already installed before 
 running the further code.

 Eg:

 Install bigfix package if bigfix service dose not exist.

 i know ensure = true will do this, but there is a possibility that bigfix 
 was installed from the source in c:\bigfix on few server and on few its 
 installed as a msi and i can see it under add remove programs.

 So the best way is to check if the bigfix service exists or not, if exist 
 ignore if not install via puppet.

 Any pointers ?



The way to inform the Puppet master about the state of the target system 
before catalog compilation is via facts.  You can create a custom fact that 
uses whatever logic is appropriate to determine whether the software in 
question is installed, and then use conditionals based on that fact in your 
manifests to control whether you declare the Package or not.

But you shouldn't.  Bite the bullet: bring your servers under control so 
that this sort of thing is no longer a concern.  It is really bad to 
install software from source on your production machines.  Everything ought 
to be managed via packages.

If needs be you could adopt a hybrid approach: write a custom fact that 
identifies when a piece of software of interest is installed from source, 
and when that's so, tell Puppet to remove it before (re)installing it from 
a package (e.g. an MSI).  The package then does not need to be conditional, 
which is to your advantage if you ever want to use Puppet to update it or 
remove it.


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/88fd0a27-1ffa-4e7a-8a9f-9961b70cbba2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Problems in Ch. 4 of Pro Puppet 2nd Edition

2014-03-05 Thread Spencer Krum
Hi Jon,

My name is Spencer Krum. I am one of the authors of Pro Puppet. I want to 
thank you for going through the book with such a fine toothed comb. I wish 
I had known you were so committed to making this book a success months ago. 
I would have gotten you an advance copy so you could have helped make the 
final version better.

From what I understand from Apress, we don't have the ability to directly 
address these problems in newly sold versions of the book. These errors 
will be with us until a 3rd edition comes out, maybe sometime around Puppet 
4.

Here is what we can do. I have created a github repository to collect the 
errata in a single place. https://github.com/pro-puppet/pro-puppet-errata
I don't think we can get that link added to the front matter, but we can 
probably get it added to the description of the book on Amazon, and can 
link to it in the online/supplemental materials. This repository is one 
central place we can collect all the errors/corrections about Pro Puppet 
2n'd edition, not just yours.

I've already added your ch1-4 reviews to that project. Would you be willing 
to work on the rest of the chapters with us? If you feel comfortable with 
git/github I can give you contributor access or I can add the text if you 
want to send it to me. I think collecting all the errors in the github 
repository is a better solution than posting them all to separate messages 
to the Puppet users mailing list, a list of over a thousand people.

What do you think?

Thanks,
Spencer

On Monday, March 3, 2014 3:15:04 AM UTC, Jon Forrest wrote:

 Again, nothing that a good proof edit couldn't fix. 

 Jon Forrest 
  

 (U) Pg. 100 Listing 4-2 shows package resource definitions appearing as 
 the result 
 of running 'puppet resource service'. Are we supposed to do anything 
 with these definitions? 

 (U) Pg. 100 In Listing 4-2 why aren't standard 'yum install' or 
 'service' commands used? 

 (U) Pg. 101 How is a reader supposes to know what an NPM provider or RVM 
 is? 

 (T) Pg 101 Often installing Passenger - 
 Often, installing Passenger 

 (T) Pg 103 will consume some time is to run - 
 will consume some time to run 

 (T) Pg. 103 facter fqdn. - 
 facter fqdn 

 (T) Pg. 103 Pro-puppet-master-centos-II - 
 pro-puppet-master-centos-II 

 (E) Pg. 103 stored in the environment as a standard environment 
 variable - 
 stored in a standard environment variable 

 (T) Pg. 105 ServerName attribute of - 
 ServerName attribute in 

 (C) Pg. 106 You should mention that the notice about installing Emacs 
 is just an example. New readers might think that they should see this 
 exact line. 

 (U) Pg. 108 Figure 4-1 looks like there are 3 machines behind the load 
 balancer, 
 but the Note makes it clear that there is really just 1 machine there. 

 (E) Pg. 111 the puppet user, as this parameter decides - 
 the puppet user since this determines 

 (E) Pg. 111 sure to modify - 
 sure to replace 

 (C) Pg. 111 Step 3 vs. four lines. You should decide on a convention 
 for including numbers in text. Either they should be all numeric (e.g. 
 3, 4) or all text (e.g. three, four). 

 (E) Pg. 111 Pass the request along - 
 Pass the request 

 (M) Pg. 111, 112 There are 3 places that the front-end load balancer 
 configuration 
 file is mentioned, saying that it appears in Listing 4-14. This actually 
 appears in Listing 4-13. 

 (E) Pg. 111 are listed, port 18140 and 18141 - 
 are listed, running on ports 18140 and 18141 

 (T) Pg. 112 look to - 
 look at 

 (T) Pg. 112 mail.pro-puppet..com - 
 mail.pro-puppet.com 

 (T) Pg. 112 back- end - 
 back-end 

 (E) Pg. 112 HTTP systems - 
 HTTP servers 

 (T) Pg. 113 logged into - 
 logged in 

 (E) Pg. 115 is also available - 
 also appears 

 (T) Pg. 115 let's bring back both workers back online - 
 let's bring both workers back online 

 (E) Pg. 120 Use the puppet agent command to generate a certificate - 
 Use the puppet agent command to generate a certificate signing request 
 (The title for List 4-34 also needs to be modified). (This is correct on 
 Pg 124). 

 (E) Pg. 121 used the ls utility - 
 used ls 

 (E) Pg. 122 with a single thread - 
 with a single core 

 (M) Pg. 123 which were defined in Listing 4-38 - 
 which were defined in Listing 4-37 

 (C) Pg. 126 First, remove the ssl/ca directory on the secondary CA 
 server 
 This step isn't necessary if you use the -a option to rsync, which makes 
 the destination an exact copy of the source. 

 (E) Pg. 127 a one-minute cron job - 
 a cron job that runs every minute 

 (C) Pg. 127 The font used in the paragraph starting This uses the rsync 
 utility is wrong. 
 It's using the console font from from the crontab -l example. 

 (E) Pg. 128 we get a test run as shown - 
 we make a test run as shown 

 (T) Pg. 130 You performed twosimple - 
 You performed two simple 

 (M) Pg. 130 We could also use DNS round robin to easily redirect 
 and consolidate all certificate requests to a single Puppet CA worked. 
 This 

[Puppet Users] Best Practices/Ideas for mixing Windows and Linux

2014-03-05 Thread Jared Annes
I'm fairly new to puppet, and I've been tasked with building manifests to 
deploy software, mostly monitoring agents. Each agent has different 
versions, and each agent has different package for each OS. I'm trying to 
figure out which would be the best way to accomplish this from a design 
perspective. Right now, everything has it's own module (OS/Agent/Version). 
However, I'm not sure this is the best way and I'm looking for opinions 
from others.

Some ideas I've had (and I'm not sure some of this is even possible, let 
alone a good idea):

Module for each agent/OS, different versions contained in the module
i.e
Agent1_linux
Agent1_windows
Agent2_linux
Agent2_windows
(each module's init.pp has different version classes or something similar)

Modules for each agent version, OSes combined in the module
Agent1_v1
Agent1_v2
Agent2_v1
Agent2_v2
(each modules init.pp has different code for the different OSes)

Combining the two ideas, one module for each agent
Agent1
Agent2
(each modules init.pp has different code for OS and versions).

Ideas? Suggestions? Theories? Thanks for any/all input. Keep in mind I'm 
new to this product, so I might not be making absolute sense.

-- 
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/410eb3db-83bb-4473-8d85-437ef813c546%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Passenger with Puppet 3.0, problems running under

2014-03-05 Thread jaredmacleod
Thank you.  I just ran into this also, and your post had the info I needed.

-- 
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/a7fd705b-3011-46bc-9e01-46cfae4a2116%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet post install launchd osx

2014-03-05 Thread Rudy McComb
Hi Moses,

I was able to successfully uninstall the previous versions of gem installed
'puppet'.

i did reinstall with dmg but and still having puppetd exit with a code of 1.

what am i doing wrong?

here is my updated plist and manifest to start launchctl

http://pastebin.com/CX56cucf
http://pastebin.com/NuurLgvq



On Thu, Feb 13, 2014 at 2:05 PM, Matthaus Owens matth...@puppetlabs.comwrote:

 Rudy,

 You also need to uninstall the facter and hiera gems, as they may be
 contributing to your issues. Aside from that, what happens if you run
 `puppet agent --no-daemonize --verbose --logdest console`? Does it also
 error out? If so, how?


 On Thu, Feb 13, 2014 at 12:14 PM, Rudy McComb valent...@thnkbig.comwrote:

 Hi Moses,

 I was able to successfully uninstall the previous versions of gem
 installed 'puppet'.

 i did reinstall with dmg but and still having puppetd exit with a code of
 1.

 what am i doing wrong?

 here is my updated plist and manifest to start launchctl

 http://pastebin.com/CX56cucf
 http://pastebin.com/NuurLgvq



 On Wed, Feb 12, 2014 at 9:19 AM, Rudy McComb valent...@thnkbig.comwrote:

 Hi Moses,

 I was able to successfully uninstall the previous versions of gem
 installed 'puppet'.

 i did reinstall with dmg but and still having puppetd exit with a code
 of 1.

 what am i doing wrong?

 here is my updated plist and manifest to start launchctl

 http://pastebin.com/CX56cucf
 http://pastebin.com/NuurLgvq




 On Tuesday, February 11, 2014 12:21:59 PM UTC-8, Moses Mendoza wrote:

 Hi Rudy,

 To uninstall a gem, just do `gem uninstall gem name(s)`, e.g. `gem
 uninstall puppet.`.

 Just to clarify, the directory you pointed out isn't the gem dir, it's
 the Mavericks system ruby site dir.

 As you discovered, OSX, the path /usr/lib/ruby/site_ruby is actually
 a symlink to the directory /Library/Ruby/Site.  This directory is where
 the dmg's of puppet, hiera, and facter install to (as shown in your image).
 Prior to Puppet 3.4.0 and Facter 1.7.5, the dmgs would install in the
 ruby-version-specific subdirectory, /Library/Ruby/Site/1.8, but we've
 moved away from that, as /Library/Ruby/Site is in the load path in OSX
 versions going awhile back and won't break when ruby versions change.

 The gem dir is actually a separate location, where rubygems stores
 information about itself, including all of your installed gems. To see the
 system gem dir, do `/usr/bin/ruby -e 'puts Gem::dir'`. This should show you
 /Library/Ruby/Gems/2.0.0/, which contains a subdirectory (gems) with
 all of your installed gems. Hope that helps.

 Moses


 On Tue, Feb 11, 2014 at 9:23 AM, Rudy McComb vale...@thnkbig.comwrote:


 https://lh4.googleusercontent.com/-1Y6RPiM0C2A/UvpcG1v6NCI/AAs/OXNKqoF8KHk/s1600/Screen+Shot+2014-02-11+at+9.16.58+AM.png
 Moses,

 can i rm puppet facter and hiera from the gem dir
 (usr/lib/ruby/site_ruby) w/o breaking puppet dmg installed in correct
 location?

 or is there another remedy you propose?

 thanks


 On Tuesday, February 11, 2014 8:42:31 AM UTC-8, Moses Mendoza wrote:

 Hi Rudy,

 Installing puppet,facter via dmg and also via gem is almost certainly
 a contributing factor to your issues. The dmg installs to ruby's
 sitedir (in the load path) and the gem installs to rubygems' gem dir
 (also in the load path). This means you have two installs of puppet
 at
 separate versions in the same ruby load path. This will break things!
 Charlie explains briefly why this won't work, here:
 https://projects.puppetlabs.com/issues/19670. You should install
 from
 gem or dmg, but not both:) Also, just to be clear, the dmg creates
 the
 puppet user, but the gem does not. Finally, facter 1.7.5 was released
 yesterday, which has mavericks compatibility when installed via dmg.
 Also, my apologies for calling you 'Ryan'!

 cheers
 Moses

 On Mon, Feb 10, 2014 at 12:14 PM, Rudy McComb vale...@thnkbig.com
 wrote:
  Hi Moses,
 
  I'm on Puppet 3.4.2, Facter 1.7.4, Mavericks 10.9.1 and installed
 with the
  dmg. I also keep puppet updated
  using gem update puppet.
 
  ill install puppet and facter with the dmg and then gem install
 puppet so
  that it creates the nec users groups etc for puppet.
 
  I have updated the plist to point to the newer version of ruby
 since
  upgraded macs keep both directories.
 
 
  On Monday, February 10, 2014 11:49:54 AM UTC-8, Moses Mendoza
 wrote:
 
  On Mon, Feb 10, 2014 at 10:55 AM, Rudy McComb vale...@thnkbig.com
 wrote:
   I'm having a an issue with running puppet as launchd. I'm using
 this
   http://docs.puppetlabs.com/guides/files/com.puppetlabs.puppe
 t.plist and
   on
   some macs it will run and start at reboot and on others it
 doesnt.
  
   According to the logs puppet is exiting with a code of 1.  What
 can i
   due to
   ensure that the puppet launchd mod runs uninhibited.
  
   http://pastebin.com/raw.php?i=CX56cucf
  
   I've also tried using a modified version of this
   ?xml version=1.0 encoding=UTF-8?
  
   !DOCTYPE plist PUBLIC -//Apple 

[Puppet Users] Re: Problems in Ch. 4 of Pro Puppet 2nd Edition

2014-03-05 Thread Alessandro Franceschi
Hei Jon,
your text correction and errors hunting skills are impressive.
I'm writing a book about Puppet too and am definitively in time to correct 
it before printing.
There are already technical reviewers doing a great work, but I think you 
can add great value to the contents and their correctness.

Let me know if you are available.
Regards
Al

On Monday, March 3, 2014 4:15:04 AM UTC+1, Jon Forrest wrote:

 Again, nothing that a good proof edit couldn't fix. 

 Jon Forrest 
  

 (U) Pg. 100 Listing 4-2 shows package resource definitions appearing as 
 the result 
 of running 'puppet resource service'. Are we supposed to do anything 
 with these definitions? 

 (U) Pg. 100 In Listing 4-2 why aren't standard 'yum install' or 
 'service' commands used? 

 (U) Pg. 101 How is a reader supposes to know what an NPM provider or RVM 
 is? 

 (T) Pg 101 Often installing Passenger - 
 Often, installing Passenger 

 (T) Pg 103 will consume some time is to run - 
 will consume some time to run 

 (T) Pg. 103 facter fqdn. - 
 facter fqdn 

 (T) Pg. 103 Pro-puppet-master-centos-II - 
 pro-puppet-master-centos-II 

 (E) Pg. 103 stored in the environment as a standard environment 
 variable - 
 stored in a standard environment variable 

 (T) Pg. 105 ServerName attribute of - 
 ServerName attribute in 

 (C) Pg. 106 You should mention that the notice about installing Emacs 
 is just an example. New readers might think that they should see this 
 exact line. 

 (U) Pg. 108 Figure 4-1 looks like there are 3 machines behind the load 
 balancer, 
 but the Note makes it clear that there is really just 1 machine there. 

 (E) Pg. 111 the puppet user, as this parameter decides - 
 the puppet user since this determines 

 (E) Pg. 111 sure to modify - 
 sure to replace 

 (C) Pg. 111 Step 3 vs. four lines. You should decide on a convention 
 for including numbers in text. Either they should be all numeric (e.g. 
 3, 4) or all text (e.g. three, four). 

 (E) Pg. 111 Pass the request along - 
 Pass the request 

 (M) Pg. 111, 112 There are 3 places that the front-end load balancer 
 configuration 
 file is mentioned, saying that it appears in Listing 4-14. This actually 
 appears in Listing 4-13. 

 (E) Pg. 111 are listed, port 18140 and 18141 - 
 are listed, running on ports 18140 and 18141 

 (T) Pg. 112 look to - 
 look at 

 (T) Pg. 112 mail.pro-puppet..com - 
 mail.pro-puppet.com 

 (T) Pg. 112 back- end - 
 back-end 

 (E) Pg. 112 HTTP systems - 
 HTTP servers 

 (T) Pg. 113 logged into - 
 logged in 

 (E) Pg. 115 is also available - 
 also appears 

 (T) Pg. 115 let's bring back both workers back online - 
 let's bring both workers back online 

 (E) Pg. 120 Use the puppet agent command to generate a certificate - 
 Use the puppet agent command to generate a certificate signing request 
 (The title for List 4-34 also needs to be modified). (This is correct on 
 Pg 124). 

 (E) Pg. 121 used the ls utility - 
 used ls 

 (E) Pg. 122 with a single thread - 
 with a single core 

 (M) Pg. 123 which were defined in Listing 4-38 - 
 which were defined in Listing 4-37 

 (C) Pg. 126 First, remove the ssl/ca directory on the secondary CA 
 server 
 This step isn't necessary if you use the -a option to rsync, which makes 
 the destination an exact copy of the source. 

 (E) Pg. 127 a one-minute cron job - 
 a cron job that runs every minute 

 (C) Pg. 127 The font used in the paragraph starting This uses the rsync 
 utility is wrong. 
 It's using the console font from from the crontab -l example. 

 (E) Pg. 128 we get a test run as shown - 
 we make a test run as shown 

 (T) Pg. 130 You performed twosimple - 
 You performed two simple 

 (M) Pg. 130 We could also use DNS round robin to easily redirect 
 and consolidate all certificate requests to a single Puppet CA worked. 
 This is exactly the opposite of what DNS round robin does. It's odd 
 that this mistake exists here since the following paragraph explains DNS 
 round robin correctly. 

 (E) Pg. 130 a portion of the Puppet agent systems - 
 some Puppet agents 

 (E) Pg. 131 As in our HTTP load balancing - 
 As in HTTP load balancing 

 (E) Pg. 131 the Puppet agent supports the configuration of a Puppet CA 
 server - 
 the Puppet agent can be configured to use a Puppet CA server 

 (U) Pg. 131 The Puppet agent configuration should set the --ca_server 
 configuration option 
 How? Does this go in puppet.conf where the other configuration options go? 
 If so, why is the option name shown with the '--' characters? 

 (E) Pg. 131 written down in puppet.conf - 
 specified in puppet.conf 

 (T) Pg. 131 I see both HA proxy and HA-proxy used. However, 
 according to http://haproxy.1wt.eu, its name is HAproxy. 
 This needs to be corrected in many places in the rest of this chapter. 

 (T) Pg. 131 impenetrable to the HA proxy - 
 impenetrable to HAproxy 

 (U) Pg. 131 populating client configs to set the caserver configuration 
 option 
 In addition to the awkward wording, it isn't 

[Puppet Users] Error 400 on SERVER: invalid byte sequence in UTF-8

2014-03-05 Thread Jay Benner
I keep getting this error with a module I wrote.  Apparently, it doesn't 
like something about my module, but I don't see anything interesting about 
it.  I found the bug below, but I don't know which config.ru to edit for 
the workaround.  Has anyone else seen this?

https://projects.puppetlabs.com/issues/20897

-- 
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/7c9b79b9-325e-4afc-8b26-ec3907ea457f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Multiple Puppet Masters Sharing .pp files?

2014-03-05 Thread kevin McCartney
We have a few different offices. I am looking to setup a puppet master in 
each location. I would like them to all have the same node definitions so 
that all offices are working off the same recipes. Is it possible if we 
have an nfs share that is accessable to all puppet masters that the .pp 
files could live on there and all masters could reference the same files? 
If that is an issue I am thinking of having a centralized location where 
all .pp are edited and then rsynced to all master puppet nodes and saved 
locally. Any ideas?

-- 
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/42c14d3b-f2bd-45f1-b04b-753d05e1fca9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Multiple Puppet Masters Sharing .pp files?

2014-03-05 Thread Patrick Kelso
On Thu, Mar 6, 2014 at 9:48 AM, kevin McCartney mccartney...@gmail.com wrote:
 We have a few different offices. I am looking to setup a puppet master in
 each location. I would like them to all have the same node definitions so
 that all offices are working off the same recipes. Is it possible if we have
 an nfs share that is accessable to all puppet masters that the .pp files
 could live on there and all masters could reference the same files? If that
 is an issue I am thinking of having a centralized location where all .pp are
 edited and then rsynced to all master puppet nodes and saved locally. Any
 ideas?

Kevin, I believe your best bet is to use a version control tool, like
Git, to achieve this. This provides not only the ability to deploy
identical configuration to all hosts, but also provides an ability to
roll back changes that are problematic with ease and in the future the
option of having branches for different environments.

There is a good blog post on it here:

http://puppetlabs.com/blog/git-workflow-and-puppet-environments

-- 
Patrick
0416 366 613
http://patrickkelso.com
@patrickkelso

-- 
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/CANf9H4aW-Aq2d1SGUnWWyzc4vi-gSpDs_%3Dk%2Bmj2RtfJH8f6big%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Multiple Puppet Masters Sharing .pp files?

2014-03-05 Thread Garrett Honeycutt


On Wednesday, March 5, 2014 3:28:30 PM UTC-8, Patrick Kelso wrote:

 On Thu, Mar 6, 2014 at 9:48 AM, kevin McCartney 
 mccart...@gmail.comjavascript: 
 wrote: 
  We have a few different offices. I am looking to setup a puppet master 
 in 
  each location. I would like them to all have the same node definitions 
 so 
  that all offices are working off the same recipes. Is it possible if we 
 have 
  an nfs share that is accessable to all puppet masters that the .pp files 
  could live on there and all masters could reference the same files? If 
 that 
  is an issue I am thinking of having a centralized location where all .pp 
 are 
  edited and then rsynced to all master puppet nodes and saved locally. 
 Any 
  ideas? 

 Kevin, I believe your best bet is to use a version control tool, like 
 Git, to achieve this. This provides not only the ability to deploy 
 identical configuration to all hosts, but also provides an ability to 
 roll back changes that are problematic with ease and in the future the 
 option of having branches for different environments. 

 There is a good blog post on it here: 

 http://puppetlabs.com/blog/git-workflow-and-puppet-environments 

 -- 
 Patrick 
 0416 366 613 
 http://patrickkelso.com 
 @patrickkelso 


+1 to Patrick's suggestion of using Git. I'm a big fan of that coupled with 
librarian-puppet-simple[1] by Dan Bode.

Why have multiple puppet masters? You must already have network 
connectivity if you are thinking of using NFS, so you might be better 
served by just running one puppet master service instead of individual 
masters at each location.

[1] - https://github.com/bodepd/librarian-puppet-simple

-g

--
Garrett Honeycutt
LearnPuppet.com
@learnpuppet  

-- 
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/a46433ec-ec23-4029-a4aa-99d65b9829ac%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Multiple Puppet Masters Sharing .pp files?

2014-03-05 Thread José Luis Ledesma
+1 just a one puppet master. If you cannot attack it directly from clients,
set up a proxy in each location.

Regards
El 06/03/2014 00:36, Garrett Honeycutt g...@garretthoneycutt.com escribió:



 On Wednesday, March 5, 2014 3:28:30 PM UTC-8, Patrick Kelso wrote:

 On Thu, Mar 6, 2014 at 9:48 AM, kevin McCartney mccart...@gmail.com
 wrote:
  We have a few different offices. I am looking to setup a puppet master
 in
  each location. I would like them to all have the same node definitions
 so
  that all offices are working off the same recipes. Is it possible if we
 have
  an nfs share that is accessable to all puppet masters that the .pp
 files
  could live on there and all masters could reference the same files? If
 that
  is an issue I am thinking of having a centralized location where all
 .pp are
  edited and then rsynced to all master puppet nodes and saved locally.
 Any
  ideas?

 Kevin, I believe your best bet is to use a version control tool, like
 Git, to achieve this. This provides not only the ability to deploy
 identical configuration to all hosts, but also provides an ability to
 roll back changes that are problematic with ease and in the future the
 option of having branches for different environments.

 There is a good blog post on it here:

 http://puppetlabs.com/blog/git-workflow-and-puppet-environments

 --
 Patrick
 0416 366 613
 http://patrickkelso.com
 @patrickkelso


 +1 to Patrick's suggestion of using Git. I'm a big fan of that coupled
 with librarian-puppet-simple[1] by Dan Bode.

 Why have multiple puppet masters? You must already have network
 connectivity if you are thinking of using NFS, so you might be better
 served by just running one puppet master service instead of individual
 masters at each location.

 [1] - https://github.com/bodepd/librarian-puppet-simple

 -g

 --
 Garrett Honeycutt
 LearnPuppet.com
 @learnpuppet

 --
 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/a46433ec-ec23-4029-a4aa-99d65b9829ac%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/a46433ec-ec23-4029-a4aa-99d65b9829ac%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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_B3ddxNLoCi0VnLQxubkocCYgqeH6yXCrusG9pZNd7wbRwBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Disable SSL when compiling catalogs for testing purposes

2014-03-05 Thread Alexander Fortin
On Wednesday, March 5, 2014 7:07:42 PM UTC+1, jcbollinger wrote:



 On Wednesday, March 5, 2014 8:35:40 AM UTC-6, Alexander Fortin wrote:

 [...] my understanding is 
 that every time we create the catalog, i.e. running 

 puppet master --compile myhost 

 this will also create a SSL cert for myhost.



 I can't say for certain that you're wrong, but I have never heard of that 
 certificate-generating behavior.  From whence comes your understanding?


I noticed because running two 'puppet master --compile' in parallel with 
the same host and same vardir path was creating conflicts, anyway these are 
the (SSL) files that get created at every run:

ssl/ca/ca_crt.pem
ssl/ca/ca_crl.pem
ssl/ca/serial
ssl/ca/ca_pub.pem
ssl/ca/ca_key.pem
ssl/ca/inventory.txt
ssl/ca/private/ca.pass
ssl/crl.pem
ssl/certs/ca.pem


Even if Puppet were doing that, I think you would find the savings 
 available from eliminating it to be negligible compared to the cost of the 
 actual catalog compilation.


I guess you are right, I hoped it was just a matter of setting a config 
parameters to false but didn't find anything like that. Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f2488970-05ce-4136-9af6-f48c11b08e5e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.