Re: [Puppet Users] rspec-puppet require syntax

2013-12-19 Thread Gavin Williams
Yeh, the quoting of the resource is key I found... Need to quote the entire 
resource, rather than the resource title... 

Gav

On Thursday, 19 December 2013 00:45:11 UTC, Mikhail Simin wrote:

 This syntax works for me:

   'require' = [
 'User[nginx]',
 'Exec[install_nginx]']

 On Wednesday, October 2, 2013 4:45:01 AM UTC-7, Johan De Wit wrote:

 When 'require' multiple resources, you should copy what the catalog 
 contains : 








 *  'require' = '[User[nginx]{:name=nginx}, 
 Exec[install_nginx]{:command=install_nginx}]',in the rspec file.  Thats 
 the only way i could make it pass the test.Grtsjo*


 On Saturday, 21 September 2013 01:52:34 UTC+2, Guy Knights wrote:

 No such luck. I all the above suggestions (capitalising class names, 
 removing inner quotes) with another require:

  * file { 'set_nginx_dir_permissions':*
 *ensure  = directory,*
 *path= /opt/nginx-${version},*
 *owner   = nginx,*
 *group   = nginx,*
 *mode= '0644',*
 *require = [User['nginx'],Exec['install_nginx']],*
 *  }*

  but it says the catalogue is set to *[User[nginx]{:name=nginx}, 
 Exec[install_nginx]{:command=install_nginx}]*, which is what I was 
 getting with the other require.

 On Thursday, 19 September 2013 22:12:34 UTC-7, Dan Bode wrote:

 I'm pretty sure the error is b/c the class names need to be capitalized.


 On Tue, Sep 17, 2013 at 10:05 AM, Guy Knights 
 g...@eastsidegamestudio.com wrote:

 Can someone tell me the correct way to specify the following require 
 statement in an rspec-puppet test?

 *require = 
 [Class['ssl'],Class['pcre3'],Staging::Extract[nginx-${version}.tar.gz]]*

 I tried this: *'require' = 
 [Class['ssl'],Class['pcre3'],Staging::Extract['nginx-1.4.1.tar.gz']]*but
  got the following error:


 *Failure/Error: )*
 *expected that the catalogue would contain Exec[install_nginx] with 
 require set to 
 `[Class['ssl'],Class['pcre3'],Staging::Extract['nginx-1.4.1.tar.gz']]` 
 but it is set to `[Class[Ssl]{:name=Ssl}, 
 Class[Pcre3]{:name=Pcre3}, 
 Staging::Extract[nginx-1.4.1.tar.gz]{:name=nginx-1.4.1.tar.gz}]` in 
 the 
 catalogue*

 I've tried every combination of different quotes, removing the inner 
 quotes, capitalising the resource titles, and even just copying and 
 pasting 
 what the error above says the catalogue is reporting, but it just doesn't 
 work. I thought I had the syntax for requires figured out, but apparently 
 not.

 Thanks,
 Guy

 -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com.
 To post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 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/4b7dbf7b-9a4c-45ab-861e-b455a3d004ad%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Package management

2013-12-19 Thread Jason Antman

Michael,


Yes, package resources (like all resources) need to be checked before 
puppet can do anything with them. I'm not quite sure what you mean by 
use yaml with a single command - puppet Package resources must be 
specified with one single package name, there's no way around this that 
I'm aware of. I think you may be misunderstanding something.


What distribution/OS are you on? What provider is being used for these 
packages? Can you provide the output of a --verbose or --debug run?


The real issue here, AFAIK, is that whatever package provider you're 
using doesn't seem to be prefetching the resources, which leads to this 
amazingly long query time. Also, taking a full 2 seconds for a package 
check sounds really wrong - once again, something that seems to point to 
prefetch not working (of course there are some cases where it's 
impossible, but those are generally edge cases AFAIK).


-jantman


On 12/18/2013 11:03 PM, Michael Bauer wrote:


Hi,

I want to manage about 200 packages with Puppet and I want a separate 
package-resource for each package. The problem is: Every time, the 
Puppet-Agent does a run / apply, he checks every 200 packages. 
Each package-check needs about 2 seconds. Altogether it takes about 
400 seconds, which is to much. I want the check to only few seconds. I 
heard that it would be possible if I use yaml with using a single 
command which contains all the desired packages. But I don't know how 
to do it.


Hopefully someone can help.

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/108cb765-add9-4f0b-ad2e-fa521836ec8b%40googlegroups.com.

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/52B2E585.8060800%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2013-12-19 Thread Erik Dalén
Sounds like there could be something wrong with your routes.yaml file. Does
it look like this example?
http://docs.puppetlabs.com/puppetdb/latest/connect_puppet_master.html#edit-routesyaml


On 18 December 2013 08:27, cko dert...@gmail.com wrote:

 Every node (except for the master) does something like this when i run
 puppet agent -t:


 root@node1:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/environment.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ssh_hostkey_localhost.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/fsecure_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
 Info: Loading facts in
 /var/lib/puppet/lib/facter/iptables_persistent_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
 Info: Caching catalog for node1.local.domain
 Info: Applying configuration version '1386350341'
 Notice: Finished catalog run in 25.51 seconds


 The puppet master however doesn't.

 An example on how this affects the functionality:

 I use a template that manages the /etc/motd file.
 It contains the fact kernelrelease. Meaning after i update the kernel on
 the master, this information is supposed to be updated. (I'm still talking
 about the master server, every other nodes works as expected!)
 But since the master doesn't load facts on a run, the motd file doesn't
 get updated.



 On Wednesday, December 18, 2013 12:13:09 AM UTC+1, Deepak Giridharagopal
 wrote:

 On Dec 17, 2013, at 9:56 AM, cko der...@gmail.com wrote:

 hey,

 so i just installed puppetdb on a dedicated server (with pgsql).

 I noticed that the puppet master server doesn't load any facts.


 What do you mean doesn't load any facts? What is the problem you're
 seeing?


 root@puppetmaster:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Caching catalog for puppetmaster.local.domain
 Info: 'replace catalog' command for puppetmaster.local.domain submitted
 to PuppetDB with UUID 87de0ebc-1543-4b8a-8434-ca9220238fda
 Info: Applying configuration version '1387297065'
 Notice: Finished catalog run in 20.88 seconds


 Is this intended? Or did i miss something while installing and connecting
 puppetDB?

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users...@googlegroups.com.

 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/18ad2d51-9259-4abb-97a4-5b28bd77eee0%
 40googlegroups.com.
 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/4f188ea4-bab7-4b30-9154-07b22ad4bc88%40googlegroups.com
 .

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




-- 
Erik Dalén

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


Re: [Puppet Users] Re: puppet node find doesn't return classes and scope vars ?

2013-12-19 Thread Felix Frank
Is there an issue for this in Jira? If not, it would be much appreciated
for either of you to create one.

Thanks,
Felix

On 12/13/2013 11:08 PM, Paul Archer wrote:
 I see that puppet 3.3.2 has the problem as well. Worse, the
 documentation for 'puppet node' doesn't match the actual command.
 
 
 On Friday, December 13, 2013 11:13:26 AM UTC-6, Jon McKenzie wrote:
 
 Re-upping this topic rather than creating a new one.
 
 I'm using Puppet 3.3.1 and am still having this problem.

-- 
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/52B2EB44.5060303%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Is there any example to collect IPs of other nodes to generate a hash to be used in mysql_grant

2013-12-19 Thread Erik Dalén
If you use puppetdb you can use my puppetdbquery module:
http://forge.puppetlabs.com/dalen/puppetdbquery

You will get it as a array of IP addresses though. But should be easier to
go from there at least. If you use the future parser it is fairly trivial
to convert that to a hash, in the old parser such conversion requires a
little more trickery, possibly with some of the stdlib functions.


On 19 December 2013 01:55, Pan Luo luopa...@gmail.com wrote:

 Hi there,

 I'm trying to setup the permissions on mysql database with multiple web
 servers using puppet-mysql module. I would like to collect all IPs of the
 web servers and run grant on the database server.

 It seems exported resources might help. The only way I can think of right
 now is to export the file resources on each web node with IP as the content
 and collect them on the db node. Then I have to load those file content
 using a custom function. Then generate a hash from them that will be sent
 to mysql::server grants variable.

 Is there a easier way to do it? 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/bfe2880e-0f5c-4f6d-b65b-9e832f4f9510%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

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


Re: [Puppet Users] puppet environments not working

2013-12-19 Thread Chantal Rosmuller
Thank you Jeff,

I changed $confdir to /etc/puppet/  but it did not fix the issue.

On Tuesday, December 17, 2013 10:49:24 PM UTC+1, Jeff Bachtel wrote:

  There is a problem with variable hooks in puppet.conf that is fixed in 
 the latest 3.4 release candidates (or so sayeth the bugreps).

 Can you try explicitly specifying your directories instead of using 
 $confdir in that puppet.conf, at least to test?

 Jeff

 On 12/17/2013 09:18 AM, Chantal Rosmuller wrote:
  
 Thnaks, i tried but it didn't work. We do not start puppetmaster as a 
 standalone service so I stopped and started apache. (can that have anything 
 to do with the problem ?)

 On Tuesday, December 17, 2013 3:08:41 PM UTC+1, John Pyeatt wrote: 

   Not certain if this is the issue or not, but there seems to be a bug 
 in the master regarding when the configuration file is read to override the 
 default settings. Try doing this:
  1) start up your puppet master
  2) after it is up and running try running this from the command line   
 *touch 
 /etc/puppet/puppet.conf*   this will force the puppet master to reparse 
 the configuration settings.

  I had a similar problem reading modulepath=.  There is apparently a fix 
 for this in 3.4
  

 On Tue, Dec 17, 2013 at 7:02 AM, Chantal Rosmuller crosm...@gmail.comwrote:

 Hi,  

  On our puppet server the puppet environments do not seem to work. This 
 is our puppet.conf:

  [main]
  logdir=/var/log/puppet
  vardir=/var/lib/puppet
  ssldir=/var/lib/puppet/ssl
  rundir=/var/run/puppet
  factpath=$vardir/lib/facter
  confdir=/etc/puppet
  templatedir=$confdir/templates
  modulepath=$confdir/modules
  manifest=$confdir/manifests/site.pp
  manifestsdir=$confdir/manifests
  hiera_config=/etc/puppet/hiera.yaml
  pluginsync = true

  [master]
  certname= puppet3.domain.com 
  hostprivkey = /var/lib/puppet/ssl/private_keys/puppet3.domain.com.pem 
 {mode = 640}
  ssl_client_header = HTTP_X_CLIENT_DN
  ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
 # ssl_client_header = SSL_CLIENT_S_DN
 # ssl_client_verify_header = SSL_CLIENT_VERIFY
  reports = store,tagmail
  #reports = store,tagmail,puppetdb
  storeconfigs = true
  storeconfigs_backend = puppetdb

  [dev]
 modulepath=$confdir/environments/dev/modules
 manifest=$confdir/environments/dev/manifests/site.pp
  
  When i try 

  puppet agent --environment dev --no-daemonize --verbose --onetime 
  
  The changes in dev are not applied. Can it have anything to do with 
 puppetdb?

  The servers seems to recognize the puppet environment:

  puppet module list --environment 'dev'
  
  returns:

  /etc/puppet/environments/dev/modules
 ├── aliases (???)
 ├── apt (???)
   etc

  
  versions on the server:

  ii  puppet 3.3.1-1puppetlabs1   
  all  Centralized configuration management - agent startup and 
 compatibility scripts
  ii  puppet-common  3.3.1-1puppetlabs1   
  all  Centralized configuration management
 ii  puppetdb   1.5.0-1puppetlabs1all 
  PuppetDB Centralized Storage.
 ii  puppetdb-terminus  1.5.0-1puppetlabs1all 
  Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
 ii  puppetmaster   3.3.1-1puppetlabs1all 
  Centralized configuration management - master startup and 
 compatibility scripts
  ii  puppetmaster-common3.3.1-1puppetlabs1   
  all  Puppet master common scripts
  
  
  
  
   -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/2b3130a5-1641-4f60-9bc7-88b4bfb4fff5%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.

  


 -- 
 John Pyeatt
 Singlewire Software, LLC
 www.singlewire.com
 --
 608.661.1184
  john@singlewire.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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/cf56d648-a42a-49c2-abab-59678409e802%40googlegroups.com
 .
 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/b97d5fc2-fe00-4215-88bf-382773de8ab3%40googlegroups.com.
For more options, visit 

Re: [Puppet Users] custom fact should not run on Solaris

2013-12-19 Thread Andreas Dvorak
Dear all

thank you for helping me.
My solution is this:
require 'facter'
Facter.add(:spacewalk) do
  confine :osfamily = RedHat
f = File.new(/etc/sysconfig/rhn/up2date)
text = f.read
if text =~ /sv2653/ then
  setcode do true end
else
  setcode do false end
end
end

Best regards
Andreas

-- 
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/9f5a8416-960f-470d-84b8-1903c0315f00%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet environments not working

2013-12-19 Thread Chantal Rosmuller
Thanks all for your input, the problem is solved. The environments worked 
but I was testing with a file in a module that was not (yet) used. Sorry 
for wasting your time. 

On Thursday, December 19, 2013 2:21:48 PM UTC+1, Chantal Rosmuller wrote:

 Thank you Jeff,

 I changed $confdir to /etc/puppet/  but it did not fix the issue.

 On Tuesday, December 17, 2013 10:49:24 PM UTC+1, Jeff Bachtel wrote:

  There is a problem with variable hooks in puppet.conf that is fixed in 
 the latest 3.4 release candidates (or so sayeth the bugreps).

 Can you try explicitly specifying your directories instead of using 
 $confdir in that puppet.conf, at least to test?

 Jeff

 On 12/17/2013 09:18 AM, Chantal Rosmuller wrote:
  
 Thnaks, i tried but it didn't work. We do not start puppetmaster as a 
 standalone service so I stopped and started apache. (can that have anything 
 to do with the problem ?)

 On Tuesday, December 17, 2013 3:08:41 PM UTC+1, John Pyeatt wrote: 

   Not certain if this is the issue or not, but there seems to be a bug 
 in the master regarding when the configuration file is read to override the 
 default settings. Try doing this:
  1) start up your puppet master
  2) after it is up and running try running this from the command line   
 *touch 
 /etc/puppet/puppet.conf*   this will force the puppet master to reparse 
 the configuration settings.

  I had a similar problem reading modulepath=.  There is apparently a fix 
 for this in 3.4
  

 On Tue, Dec 17, 2013 at 7:02 AM, Chantal Rosmuller 
 crosm...@gmail.comwrote:

 Hi,  

  On our puppet server the puppet environments do not seem to work. 
 This is our puppet.conf:

  [main]
  logdir=/var/log/puppet
  vardir=/var/lib/puppet
  ssldir=/var/lib/puppet/ssl
  rundir=/var/run/puppet
  factpath=$vardir/lib/facter
  confdir=/etc/puppet
  templatedir=$confdir/templates
  modulepath=$confdir/modules
  manifest=$confdir/manifests/site.pp
  manifestsdir=$confdir/manifests
  hiera_config=/etc/puppet/hiera.yaml
  pluginsync = true

  [master]
  certname= puppet3.domain.com 
  hostprivkey = /var/lib/puppet/ssl/private_keys/puppet3.domain.com.pem 
 {mode = 640}
  ssl_client_header = HTTP_X_CLIENT_DN
  ssl_client_verify_header = HTTP_X_CLIENT_VERIFY
 # ssl_client_header = SSL_CLIENT_S_DN
 # ssl_client_verify_header = SSL_CLIENT_VERIFY
  reports = store,tagmail
  #reports = store,tagmail,puppetdb
  storeconfigs = true
  storeconfigs_backend = puppetdb

  [dev]
 modulepath=$confdir/environments/dev/modules
 manifest=$confdir/environments/dev/manifests/site.pp
  
  When i try 

  puppet agent --environment dev --no-daemonize --verbose --onetime 
  
  The changes in dev are not applied. Can it have anything to do with 
 puppetdb?

  The servers seems to recognize the puppet environment:

  puppet module list --environment 'dev'
  
  returns:

  /etc/puppet/environments/dev/modules
 ├── aliases (???)
 ├── apt (???)
   etc

  
  versions on the server:

  ii  puppet 3.3.1-1puppetlabs1   
  all  Centralized configuration management - agent startup and 
 compatibility scripts
  ii  puppet-common  3.3.1-1puppetlabs1   
  all  Centralized configuration management
 ii  puppetdb   1.5.0-1puppetlabs1   
  all  PuppetDB Centralized Storage.
 ii  puppetdb-terminus  1.5.0-1puppetlabs1   
  all  Connect Puppet to PuppetDB by setting up a terminus for 
 PuppetDB.
 ii  puppetmaster   3.3.1-1puppetlabs1   
  all  Centralized configuration management - master startup and 
 compatibility scripts
  ii  puppetmaster-common3.3.1-1puppetlabs1   
  all  Puppet master common scripts
  
  
  
  
   -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/2b3130a5-1641-4f60-9bc7-88b4bfb4fff5%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.

  


 -- 
 John Pyeatt
 Singlewire Software, LLC
 www.singlewire.com
 --
 608.661.1184
  john@singlewire.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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/cf56d648-a42a-49c2-abab-59678409e802%40googlegroups.com
 .
 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 

[Puppet Users] Mcollective agent sync

2013-12-19 Thread Hrishi D
Hi,

 I am using custom facts and have deployed them using modules in puppet 
master. Each time a change is made i have to execute

 $ sudo puppet agent --test --pluginsync on the agent nodes to get sync 
with the master. Is there a way to resync all the agent nodes from the 
master by executing some command,


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/99bbd165-4ce7-41d8-b963-151334cbc0a2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Installing the package dependencies

2013-12-19 Thread zorruch
hi.
I have here a site.pp file:
root@puppet:/var/puppet/etc/manifests# cat /etc/puppet/puppet.conf
[main]
confdir=/var/puppet/etc
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates

#masterlog=/var/log/puppet/puppetmaster.log
#puppetdlog=$logdir/puppetd.log

#[master]
#certname = puppet.office

[dev]
manifest = /tmp/1.pp

root@puppet:/var/puppet/etc/manifests# cat /tmp/1.pp
package { php5-apc: ensure = installed }
package { php5-cli: ensure = installed }
package { php5-common: ensure = installed }
package { php5-curl: ensure = installed }
package { php5-dev: ensure = installed }
package { php5-fpm: ensure = installed }
package { php5-gd: ensure = installed }
package { php5-imap: ensure = installed }
package { php5-mcrypt: ensure = installed }
package { php5-memcache: ensure = installed }
package { php5-mysqlnd: ensure = installed }
package { php5-pinba: ensure = installed }
package { php5-redis: ensure = installed } 
root@puppet:/var/puppet/etc/manifests# 

   




Packages are installed via provider apt repository dotdeb.
After installation, produced using pupped I find packages apache:


root@web2-dev:~# puppet agent --environment dev --test
Info: Retrieving plugin
Info: Caching catalog for web2-dev.sapato
Info: Applying configuration version '1387459329'
Notice: /Stage[main]//Package[php5-gd]/ensure: created
Notice: /Stage[main]//Package[php5-apc]/ensure: created
Notice: /Stage[main]//Package[php5-common]/ensure: created
Notice: /Stage[main]//Package[php5-mcrypt]/ensure: created
Notice: /Stage[main]//Package[php5-memcache]/ensure: created
Notice: /Stage[main]//Package[php5-pinba]/ensure: created
Notice: /Stage[main]//Package[php5-fpm]/ensure: created
Notice: /Stage[main]//Package[php5-curl]/ensure: created
Notice: /Stage[main]//Package[php5-imap]/ensure: created
Notice: /Stage[main]//Package[php5-mysqlnd]/ensure: created
Notice: /Stage[main]//Package[php5-redis]/ensure: created
Notice: /Stage[main]//Package[php5-cli]/ensure: created
Notice: /Stage[main]//Package[php5-dev]/ensure: ensure changed 'purged' to 
'present'
Notice: Finished catalog run in 30.67 seconds
root@web2-dev:~# dpkg -l | grep apache
ii apache2-mpm-prefork 2.2.16-6+squeeze11 Apache HTTP Server - traditional 
non-threaded model
ii apache2-utils 2.2.16-6+squeeze11 utility programs for webservers
ii apache2.2-bin 2.2.16-6+squeeze11 Apache HTTP Server common binary files
ii apache2.2-common 2.2.16-6+squeeze11 Apache HTTP Server common files
ii libapache2-mod-php5filter 5.4.23-1~dotdeb.0 server-side, HTML-embedded 
scripting language (apache 2 filter module)
root@web2-dev:~# 


root@web2-dev:~# aptitude show apache2-utils
Package: apache2-utils
State: installed
Automatically installed: yes
Version: 2.2.16-6+squeeze11
Priority: optional
Section: httpd
Maintainer: Debian Apache Maintainers 
Uncompressed Size: 344 k
Depends: libapr1 (= 1.2.7), libaprutil1 (= 1.2.7+dfsg), libc6 (= 2.4), 
libssl0.9.8 (= 0.9.8m-1)
Conflicts: apache-common ( 1.3.28.0.1-1)
Replaces: apache-utils ( 1.3.33-4), apache2-common


I am sure that these packages were installed pupped tonnes to his work 
these packages were not.
If you put the packages manually (via apt-get) install apache does not 
occur.
How pupped installs apache?

-- 
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/4ea114cf-2db0-49b8-837e-00d93ee93d74%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] How Puppet can evaluate the output od command?

2013-12-19 Thread shlo . afgin

Thanks it's working.

But one problem left, each time Puppet run I saw the server in the 
Dashboard mark as 'Changed'. 
Nothing really changed, I need puppet to mark it as 'Unchanged'.
How I can change it so Dashboard will  mark it as 'Unchanged' action?

On Wednesday, December 18, 2013 4:58:24 PM UTC+2, Jeff Bachtel wrote:

  The command should be in single quotes, try

 exec { ls:
 command = 'test $(grep -c aa /tmp/aao) -gt 0',
 returns = 1,
 path   = /usr/bin:/usr/sbin:/bin,
 } 

 Note also that you were missing a comma after the command property, that 
 must be present.

 Jeff

 On 12/18/2013 04:40 AM, shlo@gmail.com javascript: wrote:
  

 I did not understand where exactly put the test line. I tried:
  exec { ls:
 command = test $(grep -c aa /tmp/aao) -gt 0
 returns = 1,
 path   = /usr/bin:/usr/sbin:/bin,
 } 
  I got the error:
 Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not match $(grep at /etc/puppet/.../init.pp:4 on node agent

 I need the test to run each time Puppet run.
 Thank you for your quick response.

 On Wednesday, December 18, 2013 11:11:00 AM UTC+2, Stephen Gran wrote: 

 On 12/18/2013 08:41 AM, shlo@gmail.com wrote: 
  
  Hi, 
  
  I want to run a command something like: 
  /cat /tmp/aao | grep aa | wc -l/ 
  Check the output of that command,  if the output is '0', I want to get 
 a 
  failure from puppet. 
  I tried to use 'exec' with 'returns' but it's seem that 'returns' take 
  the return code of the command and not the output of the command. 
  How can I do it right? 

 test $(grep -c aa /tmp/aao) -gt 0 

 Cheers, 

 -- 
 Stephen Gran 
 Senior Systems Integrator - theguardian.com 
 Please consider the environment before printing this email. 
 -- 
 Visit theguardian.com   

 On your mobile, download the Guardian iPhone app theguardian.com/iphoneand 
 our iPad edition 
 theguardian.com/iPad   
 Save up to 33% by subscribing to the Guardian and Observer - choose the 
 papers you want and get full digital access. 
 Visit subscribe.theguardian.com 

 This e-mail and all attachments are confidential and may also 
 be privileged. If you are not the named recipient, please notify 
 the sender and delete the e-mail and all attachments immediately. 
 Do not disclose the contents to another person. You may not use 
 the information for any purpose, or store, or copy, it in any way. 
   
 Guardian News  Media Limited is not liable for any computer 
 viruses or other material transmitted with or as part of this 
 e-mail. You should employ virus checking software. 
   
 Guardian News  Media Limited 
   
 A member of Guardian Media Group plc 
 Registered Office 
 PO Box 68164 
 Kings Place 
 90 York Way 
 London 
 N1P 2AP 
   
 Registered in England Number 908396 

 -- 


  -- 
 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/d0a7ec9b-82a7-4f1d-800c-29ddd53cc480%40googlegroups.com
 .
 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/3e8f64be-e813-41dc-be9b-169773e18b06%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2013-12-19 Thread cko
Yes, ist looks exactly like this.

cat /etc/puppet/routes.yaml 
---
master:
  facts:
terminus: puppetdb
cache: yaml


On Thursday, December 19, 2013 1:41:13 PM UTC+1, Erik Dalén wrote:

 Sounds like there could be something wrong with your routes.yaml file. 
 Does it look like this example? 
 http://docs.puppetlabs.com/puppetdb/latest/connect_puppet_master.html#edit-routesyaml


 On 18 December 2013 08:27, cko der...@gmail.com javascript: wrote:

 Every node (except for the master) does something like this when i run 
 puppet agent -t:


 root@node1:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/environment.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
 Info: Loading facts in 
 /var/lib/puppet/lib/facter/ssh_hostkey_localhost.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/fsecure_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
 Info: Loading facts in 
 /var/lib/puppet/lib/facter/iptables_persistent_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
 Info: Caching catalog for node1.local.domain
 Info: Applying configuration version '1386350341'
 Notice: Finished catalog run in 25.51 seconds

  
 The puppet master however doesn't. 

 An example on how this affects the functionality:

 I use a template that manages the /etc/motd file. 
 It contains the fact kernelrelease. Meaning after i update the kernel 
 on the master, this information is supposed to be updated. (I'm still 
 talking about the master server, every other nodes works as expected!)
 But since the master doesn't load facts on a run, the motd file doesn't 
 get updated.



 On Wednesday, December 18, 2013 12:13:09 AM UTC+1, Deepak Giridharagopal 
 wrote:

 On Dec 17, 2013, at 9:56 AM, cko der...@gmail.com wrote:

 hey,

 so i just installed puppetdb on a dedicated server (with pgsql). 

 I noticed that the puppet master server doesn't load any facts.


 What do you mean doesn't load any facts? What is the problem you're 
 seeing?


 root@puppetmaster:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Caching catalog for puppetmaster.local.domain
 Info: 'replace catalog' command for puppetmaster.local.domain submitted 
 to PuppetDB with UUID 87de0ebc-1543-4b8a-8434-ca9220238fda
 Info: Applying configuration version '1387297065'
 Notice: Finished catalog run in 20.88 seconds


 Is this intended? Or did i miss something while installing and 
 connecting puppetDB?

 -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com.

 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/18ad2d51-9259-4abb-97a4-5b28bd77eee0%
 40googlegroups.com.
 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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/4f188ea4-bab7-4b30-9154-07b22ad4bc88%40googlegroups.com
 .

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




 -- 
 Erik Dalén 


-- 
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/e1c2303b-1f04-4439-8732-5a484f372982%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Mcollective agent sync

2013-12-19 Thread Jeff Bachtel

[main] pluginsync = true


In /etc/puppet/puppet.conf on your agents is really the way to go (from 
http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync). 
Otherwise you're looking at something like MCollective to remotely force 
a plugin sync when you make changes.


But just leave pluginsync on.

Jeff

On 12/19/2013 02:25 AM, Hrishi D wrote:

Hi,

 I am using custom facts and have deployed them using modules in 
puppet master. Each time a change is made i have to execute


 $ sudo puppet agent --test --pluginsync on the agent nodes to get 
sync with the master. Is there a way to resync all the agent nodes 
from the master by executing some command,



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/99bbd165-4ce7-41d8-b963-151334cbc0a2%40googlegroups.com.

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/52B30FF0.8080807%40bericotechnologies.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppet node find doesn't return classes and scope vars ?

2013-12-19 Thread Jon McKenzie
https://tickets.puppetlabs.com/browse/PUP-1185

On Thursday, December 19, 2013 7:49:08 AM UTC-5, Felix.Frank wrote:

 Is there an issue for this in Jira? If not, it would be much appreciated 
 for either of you to create one. 

 Thanks, 
 Felix 

 On 12/13/2013 11:08 PM, Paul Archer wrote: 
  I see that puppet 3.3.2 has the problem as well. Worse, the 
  documentation for 'puppet node' doesn't match the actual command. 
  
  
  On Friday, December 13, 2013 11:13:26 AM UTC-6, Jon McKenzie wrote: 
  
  Re-upping this topic rather than creating a new one. 
  
  I'm using Puppet 3.3.1 and am still having this problem. 


-- 
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/d8ab6651-45c5-45ea-846b-c1e2d874885d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Running command in server

2013-12-19 Thread zed_0xff
Better way (without executing a process):

$new_ip=inline_template(%= Resolv::DNS.new.getaddress('www.ru').to_s -%)

or may be simple $ipaddress fact is suitable for you?

On Monday, March 5, 2012 6:22:29 PM UTC+4, pablo.f...@cscs.ch wrote:

  Hi,

  

  Try using %x{} instead of system. The system() function returns the

  return code of the process, not the output.

  

  irb %x{hostname --fqdn}.chomp

  = dagon.fnord.no

  

 That worked, thanks!

  

 For the record, this is how it looks like:

  

 $new_ip=inline_template(%= %x{host $hostname|awk '{print \$4}'}.chomp 
 %)

 notify { New IP: $new_ip: }

  

 Kind regards,

 Pablo


-- 
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/80554ee1-eff9-414f-89ae-a5714c655f29%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Push message from Windows Agent to Unix (puppet Master)

2013-12-19 Thread Jeff Bachtel
Your default node definition does not define any resources. filebucket 
does not itself define a file, it defines a location where files are 
backed up to.


If you're just beginning with Puppet, then the method for using a 
filebucket to distribute file content is not something you really want 
to be doing.



Instead do something like:

From the command line:

echo -e \n[harshita]\npath /root/harshita\nallow *  
/etc/puppet/fileserver.conf

service puppetmaster restart

then add a resource to your default node definition such as

file { 'D:\Puppet\Anshita.txt':
  source = 'puppet:///harshita/Anshita.txt',
  mode   = '0644',
}

This will ensure the creation of D:\Puppet\Anshita.txt, sourced from 
/root/harshita/Anshita.txt . Note that the unix user puppet must have 
read access to that file and directory.


Jeff

On 12/19/2013 05:41 AM, Harshita Sinha wrote:

Hi All,
I refered the link 
http://www.copperykeenclaws.com/setting-up-puppet-on-windows/#comment-1201 
http://www.copperykeenclaws.com/setting-up-puppet-on-windows/#comment-1201 to 
make Windows Agent introduce to Unix Puppet master.
I have attached screenshot, but not sure if the connectivity has been 
established . As I got no error , I presume so.


I followed 
http://docs.puppetlabs.com/references/stable/type.html#file so that I 
make sure I have done the site.pp settings properly to push the file 
from windows to unix. Not sure if its fine, because I neither see the 
file copied nor I see any thing in log files.


I have attached screenshot to ensure that connectivity is done, and 
also the site.pp file that I run from the master.


Awaiting your reply,

Many thanks,
Harshita
--
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/e66dc07c-90cf-4e48-9bd8-56f3b1f74cdf%40googlegroups.com.

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/52B31385.80303%40bericotechnologies.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] How Puppet can evaluate the output od command?

2013-12-19 Thread Felix Frank
You should structure your exec resource in such a way that it only runs
if necessary. Parameters you may want to use: onlyif, unless, creates.
Either of those can be of use here.

For what it's worth, this sounds as if you're trying to use puppet for
monitoring a file. This might be valid, but please note that a dedicated
monitoring tool such as Icinga may be more appropriate.

HTH,
Felix

On 12/19/2013 02:57 PM, shlo.af...@gmail.com wrote:
 
 Thanks it's working.
 
 But one problem left, each time Puppet run I saw the server in the
 Dashboard mark as 'Changed'.
 Nothing really changed, I need puppet to mark it as 'Unchanged'.
 How I can change it so Dashboard will  mark it as 'Unchanged' action?

-- 
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/52B3196E.8030001%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] custom fact should not run on Solaris

2013-12-19 Thread Erik Dalén
you should put the code of the fact inside the setcode block, so:

require 'facter'
Facter.add(:spacewalk) do
  confine :osfamily = RedHat
  setcode do
f = File.new(/etc/sysconfig/rhn/up2date)
text = f.read
if text =~ /sv2653/ then
  true
else
  false
end
  end
end

or even simplify it to:

require 'facter'
Facter.add(:spacewalk) do
  confine :osfamily = RedHat
  setcode { !!(File.read(/etc/sysconfig/rhn/up2date) =~ /sv2653/) }
end



On 19 December 2013 14:26, Andreas Dvorak andreas.dvo...@gmail.com wrote:

 Dear all

 thank you for helping me.
 My solution is this:
 require 'facter'
 Facter.add(:spacewalk) do
   confine :osfamily = RedHat
 f = File.new(/etc/sysconfig/rhn/up2date)
 text = f.read
 if text =~ /sv2653/ then
   setcode do true end
 else
   setcode do false end
 end
 end

 Best regards
 Andreas

 --
 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/9f5a8416-960f-470d-84b8-1903c0315f00%40googlegroups.com
 .

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




-- 
Erik Dalén

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


[Puppet Users] Windows check_sum: Error: \xF4 to UTF-8 in conversion

2013-12-19 Thread Arpin Dominique (Nter)
Hi,

I'm new with puppet.  I try to make a simple task with puppet:

PuppetMaster: 3.3.1
PuppetClient: 3.3.2 (windows 2003)
PuppetClient: 3.4RC2 (windows 2008)

Init.pp
class check_mk_client {
  file {'check_mk_agent_ini':
ensure = file,
path   = 'C:/temp/check_mk.ini',
source = 'puppet:///modules/check_mk_client/check_mk.ini',
  }
}

Puppet can copy the file on the client without problem if the file is not 
present.  However, when a change the file on the server, I got this error on 
the client when I try to update on the client's side:

Error: \xF4 to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE
Error: /Stage[main]/Check_mk_client/File[check_mk_agent_ini]/content: change 
from {md5}07f8bdf94be7a9780cbe16f5fdff4fc9 to 
{md5}2c7d5c5bf05b21a9f6393044d4bdf586
failed: \xF4 to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE

How I can replace a file on the client?  The ini file is just an example (so I 
don't want to generate a ini with a puppet module).

Best Regards,


dominique

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

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

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


[Puppet Users] RE: Windows check_sum: Error: \xF4 to UTF-8 in conversion

2013-12-19 Thread Arpin Dominique (Nter)
Hi,

I found the error... its a misconfiguration of the filebucket.

Hi didn't specified the FQDN of the puppetmaster..

Sorry,

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


De : puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] De la 
part de Arpin Dominique (Nter)
Envoyé : 19 décembre, 2013 11:34
À : 'puppet-users@googlegroups.com'
Objet : [Puppet Users] Windows check_sum: Error: \xF4 to UTF-8 in conversion

Hi,

I'm new with puppet.  I try to make a simple task with puppet:

PuppetMaster: 3.3.1
PuppetClient: 3.3.2 (windows 2003)
PuppetClient: 3.4RC2 (windows 2008)

Init.pp
class check_mk_client {
  file {'check_mk_agent_ini':
ensure = file,
path   = 'C:/temp/check_mk.ini',
source = 'puppet:///modules/check_mk_client/check_mk.ini',
  }
}

Puppet can copy the file on the client without problem if the file is not 
present.  However, when a change the file on the server, I got this error on 
the client when I try to update on the client's side:

Error: \xF4 to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE
Error: /Stage[main]/Check_mk_client/File[check_mk_agent_ini]/content: change 
from {md5}07f8bdf94be7a9780cbe16f5fdff4fc9 to 
{md5}2c7d5c5bf05b21a9f6393044d4bdf586
failed: \xF4 to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE

How I can replace a file on the client?  The ini file is just an example (so I 
don't want to generate a ini with a puppet module).

Best Regards,


dominique

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

Confidentiality Warning: This message, including any attachment, is sent only 
for the use of the intended recipient; it is confidential and may constitute 
privileged information. If you are not the intended recipient, you are hereby 
notified that any printing, copying, distribution or other use of this message 
is strictly prohibited. If you have received this email in error, please notify 
the sender immediately by return email, and delete it. Thank you!
--
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
puppet-users+unsubscr...@googlegroups.commailto:puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/C2F62CDF5915D0458F0528664315BAE732333E8A%40MTL1EXC01.scqmtl.loto-quebec.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

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

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


Re: [Puppet Users] new puppet book revision

2013-12-19 Thread William Van Hevelingen
Hi All,

There was some problem between the publishing company and the printing
company that caused the book to be delayed for so long. Amazon now says the
book is in stock so I'm assuming the problem has been resolved.

Let us know if you have any feedback good or bad. :)

Thanks
William


On Wed, Dec 18, 2013 at 9:58 AM, Stuart Cracraft smcracr...@gmail.comwrote:

 Okay, let us know your assessment of the book as well after you get
 further into it.

 And your critiques.


 On Wednesday, December 18, 2013 7:32:51 AM UTC-8, Benito Mourelo Caldeiro
 wrote:

 On mar, 2013-12-17 at 14:27 -0800, Stuart Cracraft wrote:
  It looks like Amazon/publishers/authors/etc. have revised the new
  puppet book date:
 
 
  http://www.amazon.com/Pro-Puppet-Spencer-Krum/dp/
 1430260408/ref=sr_1_3?ie=UTF8qid=1387318030sr=8-3keywords=puppet+3
 
 
  Fun!

 I bought the alfa book, and today I could download the PDF of the 2nd
 edition from apress.com.

 Saudos, Benito.








  --
 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/cc4ad721-f2a2-4647-9e10-14386b78b345%40googlegroups.com
 .

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




-- 
Thanks,
William

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


Re: [Puppet Users] new puppet book revision

2013-12-19 Thread Dan White
In stock on December 22, 2013 

...says the Amazon web page :P 


“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.” 
Bill Waterson (Calvin  Hobbes) 

- Original Message -
From: William Van Hevelingen wva...@gmail.com 
To: [Puppet-Users] puppet-users@googlegroups.com, Spencer Krum 
krum.spen...@gmail.com 
Sent: Thursday, December 19, 2013 1:34:21 PM 
Subject: Re: [Puppet Users] new puppet book revision 


Hi All, 


There was some problem between the publishing company and the printing company 
that caused the book to be delayed for so long. Amazon now says the book is in 
stock so I'm assuming the problem has been resolved. 


Let us know if you have any feedback good or bad. :) 


Thanks 
William 




On Wed, Dec 18, 2013 at 9:58 AM, Stuart Cracraft  smcracr...@gmail.com  
wrote: 




Okay, let us know your assessment of the book as well after you get further 
into it. 


And your critiques. 


On Wednesday, December 18, 2013 7:32:51 AM UTC-8, Benito Mourelo Caldeiro 
wrote: 

blockquote
On mar, 2013-12-17 at 14:27 -0800, Stuart Cracraft wrote: 
 It looks like Amazon/publishers/authors/etc. have revised the new 
 puppet book date: 
 
 
 http://www.amazon.com/Pro- Puppet-Spencer-Krum/dp/ 
 1430260408/ref=sr_1_3?ie=UTF8 qid=1387318030sr=8-3 keywords=puppet+3 
 
 
 Fun! 

I bought the alfa book, and today I could download the PDF of the 2nd 
edition from apress.com . 

Saudos, Benito. 













-- 
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/cc4ad721-f2a2-4647-9e10-14386b78b345%40googlegroups.com
 . 


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

/blockquote



-- 

Thanks, William 


-- 
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/CAEXKxLxR%2Bt9du94WhNQLpDrG%3DLRxa4UvJjQnxniOe0Kc4aJK2w%40mail.gmail.com
 . 
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/1726458901.124698.1387483671804.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] new puppet book revision

2013-12-19 Thread Stuart Cracraft
it's shipped. 

 On Dec 19, 2013, at 12:07 PM, Dan White y...@comcast.net wrote:
 
 In stock on December 22, 2013
 
 ...says the Amazon web page :P
 
 “Sometimes I think the surest sign that intelligent life exists elsewhere in 
 the universe is that none of it has tried to contact us.”
 Bill Waterson (Calvin  Hobbes)
 
 From: William Van Hevelingen wva...@gmail.com
 To: [Puppet-Users] puppet-users@googlegroups.com, Spencer Krum 
 krum.spen...@gmail.com
 Sent: Thursday, December 19, 2013 1:34:21 PM
 Subject: Re: [Puppet Users] new puppet book revision
 
 Hi All,
 
 There was some problem between the publishing company and the printing 
 company that caused the book to be delayed for so long. Amazon now says the 
 book is in stock so I'm assuming the problem has been resolved. 
 
 Let us know if you have any feedback good or bad. :)
 
 Thanks
 William
 
 
 On Wed, Dec 18, 2013 at 9:58 AM, Stuart Cracraft smcracr...@gmail.com 
 wrote:
 Okay, let us know your assessment of the book as well after you get further 
 into it.
 
 And your critiques.
 
 
 On Wednesday, December 18, 2013 7:32:51 AM UTC-8, Benito Mourelo Caldeiro 
 wrote:
 
 On mar, 2013-12-17 at 14:27 -0800, Stuart Cracraft wrote: 
  It looks like Amazon/publishers/authors/etc. have revised the new 
  puppet book date: 
  
  
  http://www.amazon.com/Pro-Puppet-Spencer-Krum/dp/1430260408/ref=sr_1_3?ie=UTF8qid=1387318030sr=8-3keywords=puppet+3
   
  
  
  Fun! 
 
 I bought the alfa book, and today I could download the PDF of the 2nd 
 edition from apress.com. 
 
 Saudos, Benito.
 
 -- 
 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/cc4ad721-f2a2-4647-9e10-14386b78b345%40googlegroups.com.
 
 For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 -- 
 Thanks,
 William
 -- 
 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/CAEXKxLxR%2Bt9du94WhNQLpDrG%3DLRxa4UvJjQnxniOe0Kc4aJK2w%40mail.gmail.com.
 For more options, visit https://groups.google.com/groups/opt_out.
 -- 
 You received this message because you are subscribed to a topic in the Google 
 Groups Puppet Users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/puppet-users/vikNED3V2A4/unsubscribe.
 To unsubscribe from this group and all its topics, 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/1726458901.124698.1387483671804.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net.
 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/41ECBF2F-EE27-4DBE-8AD9-94EAE560C740%40me.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Roles/profile design

2013-12-19 Thread Josh
As we are starting to re-factor our puppet modules using Craig's 
roles/profile design we have found that this system works well for servers 
(or groups of servers) who have an entire stack of technology deployed to 
them or who all are part the same custom application. Clusters of servers 
typically have a unique set of configuration and fit well into this design. 
 For example, a web-server in the app1 cluster may look like:

node webserver1 {
  include role::app1_webserver
}

class role::app1_webserver {
  include profiles::base
  include profiles::webserver:app1
}

class profiles::webserver::app1 {
  class { '::apache':
a = 'x',
b = 'y',
  }

  file { /etc/something:
ensure = present,
content = template(apache/blah.erb),
  }
}

Along with standard apache, there are various other custom/non-standard 
things that need to be done.  This works well in profiles because it 
provides a layer of abstraction between the component modules and this 
extra configuration is common for all servers in the app1 cluster. 

I'm having trouble understanding how to treat those one-off servers who 
just need things like a standard apache, or a standard mysqld installation, 
but aren't part of any common application and don't need any custom stuff. 
 I thought about defining profiles like so:

class profiles::webserver::apache::generic {
  include ::apache
}

I feel like this design just over complicates the profiles logic, but I 
can't seem to figure out another way to handle this type of scenario. 
 Furthermore, what if I need a generic webserver with PHP?  Do I need 
another profile (ie, profiles::webserver::apache::generic::php).  Can 
anyone give any input on to how I should be handling this?

Thanks,

Josh

-- 
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/8cac06f5-90fc-4cd3-b158-7cb20bb22fef%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppet and yum lock

2013-12-19 Thread Alexander Petrovsky
Hi!

Did you find out why does it happens? I got the same error, on amazon 
linux, puppet 3.0.2.

среда, 7 августа 2013 г., 20:08:43 UTC+4 пользователь Aaron Addleman 
написал:

 Hi Everyone,

 I am having a problem with installing rpm packages on CentOS using yum. 
 The problem is when another instance of yum is running and a lock is 
 created my module that needs to install a package is unable to proceed.

 This problem sounds like a really simple one to solve but I have not found 
 any information on a solution.

 Could someone point me in a direction?

 Thanks in advance,
 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/83bec188-4bed-42ec-b386-93ebfda4eb8d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Roles/profile design

2013-12-19 Thread Ramin K

On 12/19/2013 12:39 PM, Josh wrote:

As we are starting to re-factor our puppet modules using Craig's
roles/profile design we have found that this system works well for
servers (or groups of servers) who have an entire stack of technology
deployed to them or who all are part the same custom application.
Clusters of servers typically have a unique set of configuration and fit
well into this design.  For example, a web-server in the app1 cluster
may look like:

node webserver1 {
   include role::app1_webserver
}

class role::app1_webserver {
   include profiles::base
   include profiles::webserver:app1
}

class profiles::webserver::app1 {
   class { '::apache':
 a = 'x',
 b = 'y',
   }

   file { /etc/something:
 ensure = present,
 content = template(apache/blah.erb),
   }
}

Along with standard apache, there are various other custom/non-standard
things that need to be done.  This works well in profiles because it
provides a layer of abstraction between the component modules and this
extra configuration is common for all servers in the app1 cluster.

I'm having trouble understanding how to treat those one-off servers
who just need things like a standard apache, or a standard mysqld
installation, but aren't part of any common application and don't need
any custom stuff.  I thought about defining profiles like so:

class profiles::webserver::apache::generic {
   include ::apache
}

I feel like this design just over complicates the profiles logic, but I
can't seem to figure out another way to handle this type of scenario.
  Furthermore, what if I need a generic webserver with PHP?  Do I need
another profile (ie, profiles::webserver::apache::generic::php).  Can
anyone give any input on to how I should be handling this?

Thanks,

Josh


	You're overloading profile because you're not using Hiera or an ENC. 
Take this example


class role::app1_fe { # or perhaps ::fe_app1
  include profile::apache
  include profile::php
}

class profile::apache {
  include apache

  $mymods = hiera('apache::a2mods', {})
  create_resources('apache::a2mod', $mymods)
  $myvhosts = hiera('apache::vhosts', {})
  create_resources('apache::vhost', $myvhosts)

}

profile::apache can be used by *any* server that needs Apache because by 
default it does nothing but the minimal config of Apache. However if you 
were to feed it data such as modules to enable or vhosts to load you 
could build any Apache server you might need.


hieradata/app1_fe.yaml  # this assumes you have a role fact.
---
apache::a2mods:
  expires: {}
  headers: {}
  rewrite: {}
apache::vhosts:
  www.example.com: {}

Structures like profile::webserver::app1 indicate you're mixing roles 
and profiles. And you also embedding data into your Puppet code rather 
than writing code to consume data.


	It's a lot to wrap your head around and from my experience it takes 1-2 
restructures of your Puppet code to fully understand it.


Ramin

--
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/52B36A49.70407%40badapple.net.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Is there any example to collect IPs of other nodes to generate a hash to be used in mysql_grant

2013-12-19 Thread Pan Luo
Hi Erik,

Thanks. I'm using your module right now and was able to get all IPs of the 
web servers into an array. I'm struggling to convert them into a hash. I'm 
using puppet 3.3.2, so I suppose it's future parser? Could you give me some 
light? 

The array I got is something like this: [ip1, ip2]
The hash I would like to be convert to is:
{ ip1 = { attr1 = value1, attr2 = value2}, ip2  = { attr1 = value1, 
attr2 = value2} }
Ideally if there is any function can merge an array and hash, e.g. 
merge( [ip1, ip2], { attr1 = value1, attr2 = value2}) to get above value.

Thanks!

Cheers,
Pan

On Thursday, December 19, 2013 4:54:37 AM UTC-8, Erik Dalén wrote:

 If you use puppetdb you can use my puppetdbquery module: 
 http://forge.puppetlabs.com/dalen/puppetdbquery

 You will get it as a array of IP addresses though. But should be easier to 
 go from there at least. If you use the future parser it is fairly trivial 
 to convert that to a hash, in the old parser such conversion requires a 
 little more trickery, possibly with some of the stdlib functions.


 On 19 December 2013 01:55, Pan Luo luop...@gmail.com javascript:wrote:

 Hi there,

 I'm trying to setup the permissions on mysql database with multiple web 
 servers using puppet-mysql module. I would like to collect all IPs of the 
 web servers and run grant on the database server.

 It seems exported resources might help. The only way I can think of right 
 now is to export the file resources on each web node with IP as the content 
 and collect them on the db node. Then I have to load those file content 
 using a custom function. Then generate a hash from them that will be sent 
 to mysql::server grants variable. 

 Is there a easier way to do it? 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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/bfe2880e-0f5c-4f6d-b65b-9e832f4f9510%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Erik Dalén 


-- 
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/22c80f9f-a67d-4f43-8218-8f31d26789d2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Process hang on FreeBSD

2013-12-19 Thread Patrick Gibson
Thanks, all. I was originally hoping to just be able to build ports the old 
fashioned way, but have abandoned that route. I've upgraded to pkgng and am 
successfully using the zleslie/pkgng provider. Things are going well and 
I'm already very excited at how easy it's going to be to setup new systems. 
I'm at a point where the prebuilt packages weren't compiled with the 
options I needed, so I'm quickly learning all about poudriere and setting 
up a build machine.

One minor thing I've noticed whose only impact is cluttering up the 
important output is warning messages like:

/usr/local/lib/ruby/site_ruby/2.0/puppet/provider/package/freebsd.rb:18: 
warning: class variable access from top-level

Looking through the bug tracker, it seems there's been discussion and 
proposed solutions over the years, though perhaps they've not been applied 
globally? Do people see this on other platforms? Looking through some of 
the other providers, it seems like freebsd.rb is alone in its @@ usage.

Patrick


On Wednesday, 18 December 2013 20:59:16 UTC-8, Derek Cole wrote:

 Just wanted to throw in that you should update to pkgng. pkg_add isnt even 
 going to be an option in FreeBSD10. I have been using 
 https://forge.puppetlabs.com/zleslie/pkgng successfully with FreeBSD10 
 Beta 3 and puppet.

-- 
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/ff432291-4c54-41e7-a8d0-8abb3639b649%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: very odd Duplicate declaration problem.

2013-12-19 Thread Nathan Earixson
aha. this was it. I had:
package { bind:
 ensure = installed
}


OUTSIDE of the class site::dns_test { declaration. Thank you very much 
for the help.

-n


On Wednesday, December 18, 2013 8:52:57 AM UTC-6, jcbollinger wrote:



 On Tuesday, December 17, 2013 2:35:58 PM UTC-6, Nathan Earixson wrote:

 puppet 3.3.2 on RHEL6

 If I run puppet on a node:
 # sudo puppet agent --test --noop

 I get the following error:



 *Error: Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Duplicate declaration: Package[bind] is already declared in file 
 /etc/puppet/modules/site/manifests/dns_test.pp:4; cannot redeclare at 
 /etc/puppet/modules/site/manifests/dns.pp:4 on node 
 bushlnxadm01.chicagobooth.edu 
 http://bushlnxadm01.chicagobooth.eduWarning: Not using cache on failed 
 catalogError: Could not retrieve catalog; skipping run*


 That's weird. That node isn't a DNS server and shouldn't even be thinking 
 about running bind.

 If I open /etc/puppet/manifests/site.pp and save the file, the error goes 
 away on next puppet agent run.

 After about 15 minutes the node starts trying to apply the classes from 
 */etc/puppet/modules/site/manifests/dns_test.pp 
 *and after another 5 or so minutes I start getting the duplicate 
 declaration error again.

 If I save the manifest the puppet agent command works as expected for 
 another 15 minutes or so.



 I can't even begin to think of where to start looking on this. Any 
 thoughts would be appreciated.
 This seems to be happening on every node.



 Strange caching behavior sometimes results when you have declarations at 
 top level in a manifest other than site.pp or one directly or indirectly 
 'import'ed by site.pp.  For instance,

 module_path/my_module/manifests/init.pp:
 
 class my_module {
   # doesn't matter
 }

 # Oops:
 include dns_test

 # Also oops:
 Class['dns'] - Class['my_module']
 

 That sort of thing is very bad form because any declaration at top scope 
 (i.e. outside any class, node, or type definition) applies, in principle, 
 to all nodes, but manifests that are (only) autoloaded are may not actually 
 be evaluated for every node.  The manifest author's intention is often that 
 the top-scope declaration apply only to nodes that declare the class or 
 type associated with the manifest, but that's not the actual semantics.

 Behavior much like what you describe can result: everything works as 
 intended when the master first starts, but after a node checks in that 
 declares a certain class or type, nodes that subsequently check in get 
 cached top-scope declarations that were not intended for them.


 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/c7906b74-3be2-443a-b11a-ac379b94f484%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Process hang on FreeBSD

2013-12-19 Thread Russell A. Jackson
On 12/19/2013 04:44 PM, Patrick Gibson wrote:
 Thanks, all. I was originally hoping to just be able to build ports the old 
 fashioned way, but have abandoned that route. I've upgraded to pkgng and am 
 successfully using the zleslie/pkgng provider. Things are going well and 
 I'm already very excited at how easy it's going to be to setup new systems. 
 I'm at a point where the prebuilt packages weren't compiled with the 
 options I needed, so I'm quickly learning all about poudriere and setting 
 up a build machine.
 
 One minor thing I've noticed whose only impact is cluttering up the 
 important output is warning messages like:
 
 /usr/local/lib/ruby/site_ruby/2.0/puppet/provider/package/freebsd.rb:18: 
 warning: class variable access from top-level

The PACKAGE_ORIGIN patch needs to be disabled on the puppet port which is the
root cause of the warning. Someone should probably put in a PR to ports to
disable the patch by default so the default binary builds don't have it.

A hack'ish way to deal with it, as I have done, is to override the provider in a
module's lib directory by copying the standard provider ruby source file to
modulename/lib/puppet/provider/package/freebsd.rb.

-- 
Russell A. Jackson r...@csub.edu
Network/Datacenter Operations
California State University, Bakersfield



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Mirroring apt.puppetlabs.com creates extra directories

2013-12-19 Thread Aaron Hicks
Hi there,

Using the recommended rsync command:

rsync -av --copy-links --del 
rsync://apt.puppetlabs.com/packages/apt/http://www.google.com/url?q=http%3A%2F%2Fapt.puppetlabs.com%2Fpackages%2Fapt%2Fsa=Dsntz=1usg=AFQjCNHk-fZHUKWgwdEHx7_08rxVGvJoEw
 apt/

this mirrors the repository, but seems to create a lot of extra directories 
in the dist directory. These generally take the form of a distribution name 
followed by a timestamp number, e.g. lucid-20131219145258860605811

are these directories real? If they do exist on the puppetlabs apt server 
are they made invisible with .htaccess or directives in the vhost 
configuration? (if they are could we see that please)

Regards,

Aaron Hicks

-- 
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/3b963a4d-8f6b-4b6f-8e14-4644d2c9f2c1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppet and yum lock

2013-12-19 Thread Russell Cecala
Can you install the rpm with yum without puppet? Maybe the rpm you are
installing is doing something to cause a deadlock like executing rpm -i
some-package or yum install blah-blah in the %post section of the rpm's
spec file.


On Thu, Dec 19, 2013 at 12:54 PM, Alexander Petrovsky askju...@gmail.comwrote:

 Hi!

 Did you find out why does it happens? I got the same error, on amazon
 linux, puppet 3.0.2.

 среда, 7 августа 2013 г., 20:08:43 UTC+4 пользователь Aaron Addleman
 написал:

 Hi Everyone,

 I am having a problem with installing rpm packages on CentOS using yum.
 The problem is when another instance of yum is running and a lock is
 created my module that needs to install a package is unable to proceed.

 This problem sounds like a really simple one to solve but I have not
 found any information on a solution.

 Could someone point me in a direction?

 Thanks in advance,
 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/83bec188-4bed-42ec-b386-93ebfda4eb8d%40googlegroups.com
 .

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


Re: [Puppet Users] Is there any example to collect IPs of other nodes to generate a hash to be used in mysql_grant

2013-12-19 Thread Pan Luo
Never mind. Got it working with future parser. Here is the 
reference 
http://docs.puppetlabs.com/puppet/3/reference/experiments_lambdas.html, 
might help other people.

On Thursday, December 19, 2013 3:52:34 PM UTC-8, Pan Luo wrote:

 Hi Erik,

 Thanks. I'm using your module right now and was able to get all IPs of the 
 web servers into an array. I'm struggling to convert them into a hash. I'm 
 using puppet 3.3.2, so I suppose it's future parser? Could you give me some 
 light? 

 The array I got is something like this: [ip1, ip2]
 The hash I would like to be convert to is:
 { ip1 = { attr1 = value1, attr2 = value2}, ip2  = { attr1 = value1, 
 attr2 = value2} }
 Ideally if there is any function can merge an array and hash, e.g. 
 merge( [ip1, ip2], { attr1 = value1, attr2 = value2}) to get above value.

 Thanks!

 Cheers,
 Pan

 On Thursday, December 19, 2013 4:54:37 AM UTC-8, Erik Dalén wrote:

 If you use puppetdb you can use my puppetdbquery module: 
 http://forge.puppetlabs.com/dalen/puppetdbquery

 You will get it as a array of IP addresses though. But should be easier 
 to go from there at least. If you use the future parser it is fairly 
 trivial to convert that to a hash, in the old parser such conversion 
 requires a little more trickery, possibly with some of the stdlib functions.


 On 19 December 2013 01:55, Pan Luo luop...@gmail.com wrote:

 Hi there,

 I'm trying to setup the permissions on mysql database with multiple web 
 servers using puppet-mysql module. I would like to collect all IPs of the 
 web servers and run grant on the database server.

 It seems exported resources might help. The only way I can think of 
 right now is to export the file resources on each web node with IP as the 
 content and collect them on the db node. Then I have to load those file 
 content using a custom function. Then generate a hash from them that will 
 be sent to mysql::server grants variable. 

 Is there a easier way to do it? 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/bfe2880e-0f5c-4f6d-b65b-9e832f4f9510%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Erik Dalén 



-- 
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/97fd1f4d-6539-4daa-b7d5-cb020ecab0b0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.