[Puppet Users] Re: RFC: Default File Permissions

2013-09-19 Thread Klavs Klavsen
This would be a GREAT benefit, and I for one, would definetely make it my 
File default :)

source_permissions is a fine name for it.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet windows File permissions

2013-09-19 Thread Josh Cooper
On Thu, Mar 1, 2012 at 9:47 AM, Josh Cooper j...@puppetlabs.com wrote:

 Hi Marco,

 On Thu, Mar 1, 2012 at 6:17 AM, Marco Parra D. marco.parr...@gmail.comwrote:

  Hi Josh, thank you for reply,

 On 29-02-2012 19:12, Josh Cooper wrote:

 Hi Marco,

 On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D. marco.parr...@gmail.com
  wrote:

  Hi Josh,
 I'm runnig from cmd.exe, I'm using Administrator account on the windows
 box, this is the output for the command that you asked:

 C:\Users\Administratorwhoami /groups

 GROUP INFORMATION
 -

 Group Name   Type SID
 Attributes
   
 ===
 Everyone Well-known group S-1-1-0
 Mandatory group, Enabled by default, Enabled group
 BUILTIN\Administrators   AliasS-1-5-32-544
 Mandatory group, Enabled by default, Enabled group, Group owner


  This shows that you are running elevated, which is good.


  BUILTIN\UsersAliasS-1-5-32-545
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4
 Mandatory group, Enabled by default, Enabled group
 CONSOLE LOGONWell-known group S-1-2-1
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\Authenticated Users Well-known group S-1-5-11
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\This Organization   Well-known group S-1-5-15
 Mandatory group, Enabled by default, Enabled group
 LOCALWell-known group S-1-2-0
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10
 Mandatory group, Enabled by default, Enabled group
 Mandatory Label\High Mandatory Level LabelS-1-16-12288
 Mandatory group, Enabled by default, Enabled group

 C:\Users\Administrator


 I found a page that talks about security on windows 2008, and I tried
 changing a configuration for the IIS, On the Ineternet Information Services
 Manager, under Management, Configuration Editor, selecting Providers, click
 on Edit Items, selecting DataProtectionConfigurationProvider, I change
 useMachineProtection, and save the change.

 On Windows 7 the scripts run perfect, but on Windows 2008 R2 still
 didn't work, still the execution said that the file was modified, but
 nothing happens on the file. no errors it's showed


  Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a 64-bit
 Windows 2008 R2 to edit 
 C:\Windows\System32\inetsrv\config\applicationHost.config,
 Windows may be redirecting you to %windir%\syswow64\inetsrv instead:
 http://forums.iis.net/p/1150832/1875622.aspx


 Yeah, I'm using a Windows 7 32 bits box, and it's works fine... in the
 other hand, I've testing on Windows 2008 R2 64 bits server, I checked on
 the path tha you said, and your right, the file is changed on
 c:\windows\SysWOW64\inetsrv\config\applicationHost.config, but IIS uses the
 file on c:\windows\system32\inetsrv\config\applicationHost.config

 C:\Windows\SysWOW64\inetsrv\Configdir applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of C:\Windows\SysWOW64\inetsrv\Config

 03/01/2012  06:01 AM82,384 applicationHost.config
1 File(s) 82,384 bytes
0 Dir(s)   6,910,136,320 bytes free

 C:\Windows\SysWOW64\inetsrv\Configdir
 c:\Windows\System32\inetsrv\config\applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of c:\Windows\System32\inetsrv\config

 02/29/2012  11:01 AM82,122 applicationHost.config
1 File(s) 82,122 bytes
0 Dir(s)   6,910,136,320 bytes free


 How can I tell ruby that don't uses c:\windows\SysWOW64\inetsrv\config
 path? Is this posible?...


 You can disable file system redirection using the special 'sysnative'
 alias: C:\Windows\Sysnative\inetsrv\config\applicationHost.config. But
 acccording to MS this is not available on 2003[1], which is odd, because
 then 32-bit processes in 64-bit 2003 can't disable file system redirection
 on a per-file basis.


While working on reboot support, we discovered that there is a hotfix to
address this problem on 2003: http://support.microsoft.com/kb/942589


 There are APIs for disabling file system redirection for the entire
 process, but that would probably break 32-bit ruby.exe

 Perhaps the best option is to create a symlink to the IIS configuration
 directory[2]. However, 2003 doesn't support symlinks, so again I'm not sure
 how to do this on 64-bit 2003. Also puppet cannot currently manage symlinks
 on Windows, so you'd have to use an exec resource to do that.

 I'll add a note to our troubleshooting guide about 32vs64bit. I'd be
 curious to 

[Puppet Users] All nodes stopped reporting to puppet enterprise console

2013-09-19 Thread getSurreal
My install was working for a couple of months until I rebooted my puppet 
server.  The clients do not report an error when I run puppet agent -t.   
I've attempted to remove certificates and renew.  The clients get new 
certificates, but the console still does not update.  Even the puppet 
server itself is not updating as a client.  After reboot the only thing I 
have noticed that changed was selinux got re-enabled.  I set it back to 
disabled and rebooted, but no change.  The iptables service is stopped. 
 I've scanned all the pe- logs, but I don't see anything that stands out. 

Any help would be appreciated.

[root@Puppet ~]# getenforce
Disabled
[root@Puppet ~]# puppet agent -t
info: Retrieving plugin
info: Loading facts in 
/etc/puppetlabs/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/firewall/lib/facter/iptables_version.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/firewall/lib/facter/ip6tables_version.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/operatingsystemversion.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_systemtype.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_productkey.rb
info: Loading facts in 
/etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_sid.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/pe_version.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/concat/lib/facter/concat_basedir.rb
info: Loading facts in 
/opt/puppet/share/puppet/modules/auth_conf/lib/facter/custom_auth_conf.rb
info: Loading facts in 
/var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
info: Loading facts in 
/var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
info: Caching catalog for puppet
info: Applying configuration version '1379543327'
notice: Finished catalog run in 0.07 seconds
[root@Puppet ~]# service iptables status
iptables: Firewall is not running.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] PUPPET_CONFIGURATION_IN_REDHAT_LINUX

2013-09-19 Thread Dilip Kumar


Hi,

Could any one tell me how to configure PUPPET SERVER AND PUPPET CLIENT..and 
how to run shell script in client node which is in puppet in server..




Thanks in advance,

Dilip

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] upgrade puppet client

2013-09-19 Thread Joseph Mwesigwa Bbaale
Hi,

I have a puppet client running 2.7.18
I wish to upgrade it to 3.2 but I am not sure how to go about it.

OS = Debian Wheezy

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Cloud provisionner on CentOS 6 issue

2013-09-19 Thread Vincent Nawrocki
Hi !

I finally found the solution using a previous version of the nokogiri gem.
All the installation procedure is explained on 
http://nokogiri.org/tutorials/installing_nokogiri.html
I needed to install some libxml packages with yum in order to install the 
version 1.5.10 which is running on ruby 1.8.7
Then I easily installed the Fog gem.

Everything works fine now.
I still have a question : I'm working with the open source version of 
puppet and I can't use puppet node_aws install ..., is this normal ? It 
doesn't even appear in the 'puppet help node_aws'.

Thanks in advance !
 Vincent

Le mercredi 18 septembre 2013 11:18:43 UTC+2, Vincent Nawrocki a écrit :

 Hi !

 I am currently testing puppet on CentOS 6 and I wish to test the cloud 
 provisioner tool.
 The problem is the following : I can't use fog because of ruby version 
 issue.

 The system : CentOS 6.4 with Ruby 1.8.7 (last version for CentOS)

 What I did to get the problem :
 install puppet-server
 install module puppetlabs-cloud_provisioner
 Trying install Fog -v 0.7.2 (cloud service library in ruby) but a 
 dependence of it need a newer version of ruby (at least 1.9.2).
 So I installed RVM and then ruby 1.9.2 to be able to install fog and all 
 its dependencies, it worked fine.
 Install guid gem (required by cloud_provisioner)

 Then I did : export RUBYLIB=/etc/puppet/modules/cloud_provisioner/lib:$RUBYLIB

 After this, PuppetLabs suggests to test if the installation worked fine by 
 executing :
 # puppet help node_aws

 Here is the result :
 [root@poste403 ~]# puppet help node_aws
 /usr/local/rvm/gems/ruby-1.9.2-p320/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.so:
  [BUG] Segmentation fault
 ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
 Abandon (core dumped)

 I really don't understand why this.
 If anyone encountered this problem before, thanks for help.

 Vincent



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: upgrade puppet client

2013-09-19 Thread Joseph Mwesigwa Bbaale
UPDATE:

I have used this...

package { puppet:
   ensure = latest,
   }

...but I get this...

warning: Could not retrieve fact fqdn
err: /Stage[main]//Package[puppet]/ensure: change from 2.7.18-5 to 
3.2.4-1puppetlabs1 failed: Could not update: Execution of '/usr/bin/apt-get 
-q -y -o DPkg::Options::=--force-confold install puppet' returned 100: 
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  facter hiera libruby puppet-common ruby-rgen virt-what
Suggested packages:
  puppet-el vim-puppet ruby-selinux libselinux-ruby1.8 librrd-ruby1.9.1
  librrd-ruby1.8
The following NEW packages will be installed:
  hiera libruby ruby-rgen virt-what
The following packages will be upgraded:
  facter puppet puppet-common
3 upgraded, 4 newly installed, 0 to remove and 21 not upgraded.
Need to get 1241 kB of archives.
After this operation, 1798 kB of additional disk space will be used.
Get:1 http://ftp.de.debian.org/debian/ wheezy/main virt-what amd64 1.12-1 
[12.9 kB]
Get:2 http://ftp.de.debian.org/debian/ wheezy/main libruby all 1:1.9.3 
[6218 B]
Get:3 http://apt.puppetlabs.com/ wheezy/main facter amd64 
1.7.3-1puppetlabs1 [75.2 kB]
Get:4 http://apt.puppetlabs.com/ wheezy/main hiera all 1.2.1-1puppetlabs1 
[18.7 kB]
Get:5 http://apt.puppetlabs.com/ wheezy/dependencies ruby-rgen all 
0.6.5-1puppetlabs1 [82.3 kB]
Get:6 http://apt.puppetlabs.com/ wheezy/main puppet all 3.2.4-1puppetlabs1 
[68.4 kB]
Get:7 http://apt.puppetlabs.com/ wheezy/main puppet-common all 
3.2.4-1puppetlabs1 [977 kB]
Fetched 1241 kB in 3s (332 kB/s)
Selecting previously unselected package virt-what.
(Reading database ... 41033 files and directories currently installed.)
Unpacking virt-what (from .../virt-what_1.12-1_amd64.deb) ...
Preparing to replace facter 1.6.10-1 (using 
.../facter_1.7.3-1puppetlabs1_amd64.deb) ...
Unpacking replacement facter ...
Selecting previously unselected package libruby.
Unpacking libruby (from .../libruby_1%3a1.9.3_all.deb) ...
Selecting previously unselected package hiera.
Unpacking hiera (from .../hiera_1.2.1-1puppetlabs1_all.deb) ...
Selecting previously unselected package ruby-rgen.
Unpacking ruby-rgen (from .../ruby-rgen_0.6.5-1puppetlabs1_all.deb) ...
Preparing to replace puppet 2.7.18-5 (using 
.../puppet_3.2.4-1puppetlabs1_all.deb) ...
Stopping puppet agent.
Unpacking replacement puppet ...
dpkg: error processing 
/var/cache/apt/archives/puppet_3.2.4-1puppetlabs1_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man8/puppet-kick.8.gz', which is also 
in package puppet-common 2.7.18-5
insserv: warning: script 'jetty' missing LSB tags and overrides
Starting puppet agent.
Preparing to replace puppet-common 2.7.18-5 (using 
.../puppet-common_3.2.4-1puppetlabs1_all.deb) ...
Unpacking replacement puppet-common ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/puppet_3.2.4-1puppetlabs1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 at /tmp/puppetugrade.pp:3
notice: Finished catalog run in 9.13 seconds

Any help is highly appreciated

On Thursday, 19 September 2013 11:50:33 UTC+3, Joseph Mwesigwa Bbaale wrote:

 Hi,

 I have a puppet client running 2.7.18
 I wish to upgrade it to 3.2 but I am not sure how to go about it.

 OS = Debian Wheezy

 Thanks in advance


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] default data lookup w/ hiera2? Data in Modules

2013-09-19 Thread robbyt
On Wednesday, September 18, 2013 3:15:18 PM UTC+3, Henrik Lindberg wrote:

 Here are the possible alterantives: 

 arity 1: String key 
 arity 1: Hash options 
 arity 2: String key, String | Type type 
 arity 2: String key, Hash options 
 arity 3: String key, String | Type type, Object default_value 

 Regards 
 - henrik 


Hi Henrik,
Yes, I think those options are reasonable.

In addition, I assume that we can still use a variable for all of the 
arguments? e.g.,
$default_data = { type = 'Integer', default = 42 }
lookup('mykey', $default_data) 

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet 3.3.0 Certificate Issue

2013-09-19 Thread Bruce Bushby
Hi

I've been struggling with Puppet 3.3.0 in what appears to be a bug so I'm 
hoping this post invites some assistance.

My setup is 100% stock standard default. with the exception of a single 
dns entry (cname) of puppet which point to my master adm6.

I 've been running puppet 2.7.23 without any problems and decided to 
upgrade to the latest version. In order to test 3.3.0, I installed to new 
RHEL 6.4
boxes, added the puppetlabs-products repository and installed the latest 
puppet (3.3.0)

Everything appears to work ...until I sign a test clients key 
 immediately after singing a client key, the puppetmaster (adm6.xx.xx.xx) 
decided that I need
to clean it's OWEN client key.

[root@puppetmaster ~]#
[root@puppetmaster ~]# 
[root@puppetmaster ~]# puppet ca list --all
+ adm6.xxx.xxx.xxx   (SHA256) 
9B:71:FB:A4:C2:06:F2:83:3E:40:55:CF:41:39:91:4F:F7:5C:45:8D:79:8E:D3:68:63:FD:B0:14:A6:AC:FE:59
  bbushby-linux.xxx.xxx.xxx  (SHA256) 
FF:11:53:FE:3C:85:75:33:2E:C0:8A:A1:00:BD:23:96:62:73:64:1F:8B:C8:5C:7D:65:7D:04:7F:8F:89:89:13
[root@puppetmaster ~]# 

[root@puppetmaster ~]# puppet cert list 
  bbushby-linux.xxx.xxx.xxx (SHA256) 
FF:11:53:FE:3C:85:75:33:2E:C0:8A:A1:00:BD:23:96:62:73:64:1F:8B:C8:5C:7D:65:7D:04:7F:8F:89:89:13
[root@puppetmaster ~]# 

[root@puppetmaster ~]# puppet cert sign bbushby-linux.xxx.xxx.xxx
Notice: Signed certificate request for bbushby-linux.xxx.xxx.xxx
Notice: Removing file Puppet::SSL::CertificateRequest 
bbushby-linux.xxx.xxx.xxx at 
'/var/lib/puppet/ssl/ca/requests/bbushby-linux.xxx.xxx.xxx.pem'
[root@puppetmaster ~]# 

[root@puppetmaster ~]# puppet cert list -all
+ adm6.xxx.xxx.xxx  (SHA256) 
9B:71:FB:A4:C2:06:F2:83:3E:40:55:CF:41:39:91:4F:F7:5C:45:8D:79:8E:D3:68:63:FD:B0:14:A6:AC:FE:59
 
(alt names: DNS:xxx.xxx.xxx.xxx, DNS:puppet, DNS:puppet.xxx.xxx.xxx)
+ bbushby-linux.xxx.xxx.xxx (SHA256) 
B5:B7:2D:44:52:07:CA:DC:5C:99:3A:AC:24:29:85:A6:88:E9:0C:3B:54:30:71:4D:D0:FC:DC:3A:D5:E8:E2:52
[root@puppetmaster ~]# 

[root@puppetmaster ~]# puppet ca list --all
Error: The certificate retrieved from the master does not match the agent's 
private key.
Certificate fingerprint: 
B5:B7:2D:44:52:07:CA:DC:5C:99:3A:AC:24:29:85:A6:88:E9:0C:3B:54:30:71:4D:D0:FC:DC:3A:D5:E8:E2:52
To fix this, remove the certificate from both the master and the agent and 
then start a puppet run, which will automatically regenerate a certficate.
On the master:
  puppet cert clean adm6.xxx.xxx.xxx
On the agent:
  rm -f /var/lib/puppet/ssl/certs/adm6.xxx.xxx.xxx.pem
  puppet agent -t

Error: Try 'puppet help ca list' for usage
[root@puppetmaster ~]# 


I have tried so many different setups, fresh OS installs ... all of it and 
I am unable to sign a key and then run pupppet ca list --all


Anybody else have this issue?

Both my machines are RHEL 6.4
Both have ntp and correct UTC time
Both have exact same versions of rpms (puppetmaster has an extra rpm 
puppet-server)

I then dropped my puppet and puppet-server versions down to 3.2.4 same 
problem  (now I'm wondering if it is a bug...since it's happening across 
versions)


These people appear to experience similar problems:
http://www.mail-archive.com/puppet-bugs@googlegroups.com/msg46757.html 
http://projects.puppetlabs.com/issues/19680 
http://comments.gmane.org/gmane.comp.sysutils.puppet.user/46356 
http://thr3ads.net/puppet-users/2012/12/2238067-puppet-ca-list-all-ERROR 
http://thr3ads.net/puppet-users/2007/10/186450-puppetca-is-unable-to-sign-certificate



Any ideas? 

Thanks
Bruce



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Not able to capture node info via browser

2013-09-19 Thread Raju Patil
Here, puppetdb is just an example, I have given the fact is I am able to 
open this URL using localhost  curl command in Linux terminal.
However, same I am expecting to get via browser. I am trying to check 
feasibility of pupet to integrate with third party tool.
Here, we are developing in house automation tool  trying to push  execute 
scripts remotely from puppet master
 
On Wednesday, 18 September 2013 16:59:29 UTC+5:30, Raju Patil wrote:

  If I run below command on puppet master. I am able to get output pasted 
 here.
 But the same information, I am trying to capture via browser using 
 http://puppetdb:8080/v2/facts/operatingsystembut not working
  
  
  
 [root@puppetmaster ~]curl -X GET 
 http://puppetdb:8080/v2/facts/operatingsystem
 curl: (6) Couldn't resolve host 'puppetdb'
 [root@puppetmaster ~]# curl -X GET 
 http://localhost:8080/v2/facts/operatingsystem
 [ {
   certname : es-w2k8sql2k804.vshimslab.com,
   name : operatingsystem,
   value : windows
 }, {
   certname : infafr00012.nmumarl.lntinfotech.com,
   name : operatingsystem,
   value : CentOS
 }, {
   certname : puppetmaster,
   name : operatingsystem,
   value : CentOS


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: How to deploy excecute script remotely

2013-09-19 Thread Raju Patil
JuanBrein,
 
Can you pls.mention here, what activites do I have to perform on Master  
nodes.
 
Will be very helpful.
 
Since I really dont know where this 
 file resource to deploy the file and then exec to execute it:

 

On Monday, 16 September 2013 18:23:18 UTC+5:30, JuanBrein wrote:

 Not hard at all...

 just use file resource to deploy the file and then exec to execute it:

 file{ /path/to/my/script.sh
   source = puppet:///modules/${module_name}/script.sh,
   mode = 755,
 } ~

 exec { /path/to/my/script.sh
refreshonly = true,
 }

 The important bit here is the ~ . That means notify and require. It 
 basically means it will notify the exec when the file is deployed and that 
 puppet will push the file before trying to execute it. The refreshonly true 
 will assure you that the script will be executed only if it is notified.

 Cheers

 Juan

 On Monday, September 16, 2013 7:25:59 AM UTC+1, Raju Patil wrote: 

  Hi,
  
 I am new to Puppet  just had installed Puppet master on Centos.And 
 manging Linux  Windows nodes, now I would like to deploy and execute 
 script on one of my Linux Box Remotely from 
 Puppet Master.
  
 Appriciate your help. Pls. share steps to be followed for achieving above 
 tast. 



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: How to deploy excecute script remotely

2013-09-19 Thread Raju Patil

On Thursday, 19 September 2013 18:31:21 UTC+5:30, Raju Patil wrote: 

  JuanBrein,
  
 Can you pls.mention here, what activites do I have to perform on Master  
 nodes.
  
 Will be very helpful.
  
 Since I really dont know where this 
  file resource to deploy the file and then exec to execute it:

  

 On Monday, 16 September 2013 18:23:18 UTC+5:30, JuanBrein wrote:

 Not hard at all...

 just use file resource to deploy the file and then exec to execute it:

 file{ /path/to/my/script.sh
   source = puppet:///modules/${module_name}/script.sh,
   mode = 755,
 } ~

 exec { /path/to/my/script.sh
refreshonly = true,
 }

 The important bit here is the ~ . That means notify and require. It 
 basically means it will notify the exec when the file is deployed and that 
 puppet will push the file before trying to execute it. The refreshonly true 
 will assure you that the script will be executed only if it is notified.

 Cheers

 Juan

 On Monday, September 16, 2013 7:25:59 AM UTC+1, Raju Patil wrote: 

  Hi,
  
 I am new to Puppet  just had installed Puppet master on Centos.And 
 manging Linux  Windows nodes, now I would like to deploy and execute 
 script on one of my Linux Box Remotely from 
 Puppet Master.
  
 Appriciate your help. Pls. share steps to be followed for achieving 
 above tast. 



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] b64_zlib_yaml errros after server upgrade to

2013-09-19 Thread Henrik Nicolaisen


On Thursday, September 19, 2013 12:45:43 AM UTC+2, Patrick Carlisle wrote:


 On Tue, Sep 17, 2013 at 1:14 AM, Andrei-Florian Staicu 
 andrei...@gmail.com javascript: wrote:

 Any idea if this is a recognized bug?


 I don't think it is. Please file a bug report at projects.puppetlabs.comand 
 we can investigate this further.


I created it here https://projects.puppetlabs.com/issues/22614 

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Not able to capture node info via browser

2013-09-19 Thread Ken Barber
 Here, puppetdb is just an example, I have given the fact is I am able to
 open this URL using localhost  curl command in Linux terminal.

Okay.

 However, same I am expecting to get via browser.

Right but like I said, the API parts don't work in a browser unless
you are using some form of Javascript/AJAX style access. The API is
designed to be programmatically called via another program or piece of
software. There is a dashboard though which does contain some browser
content for humans to look at, is that what you mean?

Your two statements are not making sense to me, one the one hand you
want to access the API and integrate things from another tool, but on
the other hand you expect browser output. I presume the confusion here
is that you are having connectivity issues generally and that a
'browser' is just a method of testing that.

 I am trying to check
 feasibility of pupet to integrate with third party tool.

Right, and PuppetDB totally supports integration via its various REST
api's: http://docs.puppetlabs.com/puppetdb/1.4/api/index.html

 Here, we are developing in house automation tool  trying to push  execute
 scripts remotely from puppet master

I see, like mcollective? http://puppetlabs.com/mcollective

So besides your requirements ... did you see my previous point about
your hosts entry? That was the fault that seemed to be occurring for
your second curl, have you been able to remedy this yet? The issue to
me seems to be host resolution, not an issue with PuppetDB per se.

ken.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] All nodes stopped reporting to puppet enterprise console

2013-09-19 Thread Peter Bukowinski
On Sep 18, 2013, at 6:55 PM, getSurreal ja...@getsurreal.com wrote:

 My install was working for a couple of months until I rebooted my puppet 
 server.  The clients do not report an error when I run puppet agent -t.   
 I've attempted to remove certificates and renew.  The clients get new 
 certificates, but the console still does not update.  Even the puppet server 
 itself is not updating as a client.  After reboot the only thing I have 
 noticed that changed was selinux got re-enabled.  I set it back to disabled 
 and rebooted, but no change.  The iptables service is stopped.  I've scanned 
 all the pe- logs, but I don't see anything that stands out. 
 
 Any help would be appreciated.
 
 [root@Puppet ~]# getenforce
 Disabled
 [root@Puppet ~]# puppet agent -t
 info: Retrieving plugin
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/firewall/lib/facter/iptables_version.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/firewall/lib/facter/ip6tables_version.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/operatingsystemversion.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_systemtype.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_productkey.rb
 info: Loading facts in 
 /etc/puppetlabs/puppet/modules/win_facts.old/lib/facter/windows_sid.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/stdlib/lib/facter/pe_version.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/concat/lib/facter/concat_basedir.rb
 info: Loading facts in 
 /opt/puppet/share/puppet/modules/auth_conf/lib/facter/custom_auth_conf.rb
 info: Loading facts in 
 /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
 info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
 info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
 info: Caching catalog for puppet
 info: Applying configuration version '1379543327'
 notice: Finished catalog run in 0.07 seconds
 [root@Puppet ~]# service iptables status
 iptables: Firewall is not running.


Do you get similar output when you do a puppet run on other nodes? I don't see 
any errors, so from a node perspective it appears that the puppet server is 
still doing its job. The console is an entirely separate animal that relies on 
a separate service called 'pe-puppet-dashboard-workers' to process the incoming 
reports into its database.

Do you see a large number of pending jobs in the Background Tasks section in 
the upper-left corner of the console? If so, start or restart the 
'pe-puppet-dashboard-workers' service (and make sure it's set to run at boot 
time) and you'll see the number of pending tasks decrease and run node statuses 
start to update in the console.

--
Peter Bukowinski

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-19 Thread jcbollinger


On Wednesday, September 18, 2013 3:01:49 PM UTC-5, Sam Tresler wrote:

 Hi, I've inherited a puppet setup for automating php installation and 
 extension management.  We're on Debian and we've encountered a strange 
 issue that I've traced down back to puppet I think. I've stripped back the 
 configuration and made the problem reproducible, logs and config pasted 
 below. 

 1. php5-common, php5-memcache, and php5-mysql are all installed. 
 2. php5-common and php5-mysql receive an update, say from 
 5.3.3-7+squeeze14 to 5.3.3-7+squeeze17
 3. Puppet runs and php5-common upgrade conflicts. Apt's first solution 
 removes php5-mysql and php5-memcache. 
 4. Puppet continues run and re-installs/upgrades php5-mysql. It skips 
 php5-memcache.
 5. On a subsequent run php5-memcache is installed again as expected. 

 This appears to only happen to packages that don't share the php5 version 
 naming schema, but that may be just a clue, not a cause. e.g. php5-memcache 
 is 3.0.4-4+squeeze1. 



Yes, that's a clue, not the cause.  Here's what I think is happening:

Early in the run, before applying any resources, the Puppet agent 
prefetches the installed apt packages.  This is a common behavior of 
providers for many resource types where it is more efficient than loading 
each declared resource's initial state individually.  Puppet thereafter 
assumes that the data it has prefetched do not change except as the agent 
itself explicitly changes them.  In particular, it will be caught quite by 
surprise if one of the resources it has prefetched is no longer present on 
the system when it comes time to apply it.

If you look carefully at the log, you will see that it is not just 
php5-memcache about which the agent is confused.  The log also says: 
'php5-mysql 5.3.3-7+squeeze14 is installed', which is no longer true at 
the time that that message is emitted.  It happens that the result is 
nevertheless what you want in that case, however, because the reason the 
package was removed is correlated with the availability of a later version 
of it.

This explanation assumes that the latest available version of php5-memcache 
is the same one that was already installed at the start of the Puppet run.  
In that case, however, it is a mystery beyond my understanding why that 
package needed to be removed for the update to php5-common to proceed, and 
it was not automatically reinstalled, yet it could later be reinstalled 
manually.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] staging puppet env

2013-09-19 Thread ureal frank
Hi guys,

I'm willing to test this possible pre-production environment:
Puppet 3 backed up with MCollective, PuppetDB, MQ, Dashboard.

Two questions:

- Should I keep each component on it's own VM?

- Is there any Ansible/(other cfgmgn tool) playbook to kick this out?


Cheers,
Frank

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Fail/stop after a step fails?

2013-09-19 Thread jcbollinger


On Wednesday, September 18, 2013 9:14:26 AM UTC-5, mcd wrote:

 Try the fail() function. Something like this:

 if ($continue != true) {
   fail('Condition not met, failing now.')
 }



Nope.  Like all Puppet DSL functions, fail() is executed on the master 
during catalog compilation.  It causes catalog compilation to fail.   That 
doesn't address Robin's desire to interrupt the application of resources 
mid-stream in the event of a resource application failure.

Puppet's standard behavior is to attempt to apply as much of the catalog as 
possible despite the failure of some resources.  As far as I know or can 
determine, there is no option to instead stop applying resources when one 
fails.  It may be, however, that the number of separate warnings could be 
greatly reduced by wrapping groups of the dependent resources into defined 
type instances, so that (I speculate) you get Skipped messages only for 
the comparatively few wrappers instead of for every wrapped resource.  Or 
you could consider filtering out the messages.  You could also consider 
filing an RFE.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-19 Thread Sam Tresler
Ah. That makes a lot of sense. I'd noticed the php5-mysql 'upgrade' and 
assumed I was getting an erroneous message, but if puppet thinks it is 
doing that there is actually no difference in the aptitude commands between 
an install and an upgrade.  The packages with names that match php5-common 
*do* register as needing an upgrade at the beginning of the run, and are 
actually caught and reinstalled mistakenly. Anything that doesn't need an 
upgrade is never touched because it didn't need anything in the first 
place. 

My predecessor switched to running puppet non-daemonized on a 20m cron job. 
And I think this would not be an issue in a daemonized mode (perhaps) - as 
puppet would see the inconsistency faster, which is why I can find NOTHING 
on google about a similar problem. 

So, I think I'll proceed by having the php extensions without the same 
versioning schema subscribe to the php5-common resource and (I'll have to 
see what options are there) and check themselves again or kick off a second 
puppet run immediately. 

Thanks a ton. I had all the pieces but couldn't quite see it. 

On Thursday, September 19, 2013 9:39:01 AM UTC-4, jcbollinger wrote:



 On Wednesday, September 18, 2013 3:01:49 PM UTC-5, Sam Tresler wrote:

 Hi, I've inherited a puppet setup for automating php installation and 
 extension management.  We're on Debian and we've encountered a strange 
 issue that I've traced down back to puppet I think. I've stripped back the 
 configuration and made the problem reproducible, logs and config pasted 
 below. 

 1. php5-common, php5-memcache, and php5-mysql are all installed. 
 2. php5-common and php5-mysql receive an update, say from 
 5.3.3-7+squeeze14 to 5.3.3-7+squeeze17
 3. Puppet runs and php5-common upgrade conflicts. Apt's first solution 
 removes php5-mysql and php5-memcache. 
 4. Puppet continues run and re-installs/upgrades php5-mysql. It skips 
 php5-memcache.
 5. On a subsequent run php5-memcache is installed again as expected. 

 This appears to only happen to packages that don't share the php5 version 
 naming schema, but that may be just a clue, not a cause. e.g. php5-memcache 
 is 3.0.4-4+squeeze1. 



 Yes, that's a clue, not the cause.  Here's what I think is happening:

 Early in the run, before applying any resources, the Puppet agent 
 prefetches the installed apt packages.  This is a common behavior of 
 providers for many resource types where it is more efficient than loading 
 each declared resource's initial state individually.  Puppet thereafter 
 assumes that the data it has prefetched do not change except as the agent 
 itself explicitly changes them.  In particular, it will be caught quite by 
 surprise if one of the resources it has prefetched is no longer present on 
 the system when it comes time to apply it.

 If you look carefully at the log, you will see that it is not just 
 php5-memcache about which the agent is confused.  The log also says: 
 'php5-mysql 5.3.3-7+squeeze14 is installed', which is no longer true at 
 the time that that message is emitted.  It happens that the result is 
 nevertheless what you want in that case, however, because the reason the 
 package was removed is correlated with the availability of a later version 
 of it.

 This explanation assumes that the latest available version of 
 php5-memcache is the same one that was already installed at the start of 
 the Puppet run.  In that case, however, it is a mystery beyond my 
 understanding why that package needed to be removed for the update to 
 php5-common to proceed, and it was not automatically reinstalled, yet it 
 could later be reinstalled manually.


 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: ENC paramater interpolation in ENC, and inline templates

2013-09-19 Thread jcbollinger


On Wednesday, September 18, 2013 7:36:01 AM UTC-5, Jason Antman wrote:

 I'm in the process of rolling out a new homegrown ENC (we've decided on 
 using an ENC over hiera; I know it's not the way a lot of you are going, 
 but it's right for us) and am running into some issues with variable 
 interpolation in ENC data. 



That's because Puppet does not do any interpolation of variable and 
parameter values specified by an ENC.  Interpolation is a DSL feature, and 
using an ENC to declare variables and parameters bypasses the DSL.  
Therefore, if you want to use an ENC then it must be smart enough to output 
the needed values as literals.  You might be able to massage that 
requirement a little, however, by creating wrapper classes for your ENC to 
declare, wherein the desired interpolation is performed and the results 
forwarded to the real target classes.  


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: exec timeout clarification

2013-09-19 Thread jcbollinger


On Thursday, September 19, 2013 3:14:02 AM UTC-5, Geoff Galitz wrote:


 Hi.

 The docs say:

 -
 timeout

 The maximum time the command should take. If the command takes longer than 
 the timeout, the command is considered to have failed and will be stopped. 
 The timeout is specified in seconds. The default timeout is 300 seconds and 
 you can set it to 0 to disable the timeout
 ---


 Does that mean if the timeout is exceeded puppet will skip to the next 
 operation, or will it actually try to terminate the command was exec'd?



I read the docs as saying that Puppet will attempt to kill the child 
process wherein the command is running.  I don't see how else to interpret 
will be stopped.

 

  

 I ask because we have a case where a script is running, it gets hung up 
 (on hardware issues) and the puppet run stalls forever.  The default 
 timeout does not seem to be honored.



It seems reasonable to posit that when the timeout expires, Puppet's 
attempt to kill the hung script itself hangs.  I suspect that you could 
confirm as much by obtaining an strace of the failure.  I'm not sure 
whether there is any way Puppet could be improved to deal with such cases, 
but you should consider filing a ticket.  Even if the issue cannot be 
fixed, a ticket would have documentary value.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: enablerepo option

2013-09-19 Thread puppetstan
or if you have an other idea to use enablerepo i m interesting

regards

Le vendredi 13 septembre 2013 17:23:32 UTC+2, puppetstan a écrit :

 Hi

 I would like to use enablerepo option for activate repo and verify package 
 latest version

 my manifest :

 package { fusioninventory-agent: ensure = latest, enablerepo = [ 
 epel, remi ]; }

 there this patch : http://projects.puppetlabs.com/issues/2247 but it does 
 not work in my configuration

 Can you have the same problem or an other solution to activate multiple 
 rpm repo with enablerepo command?
 regards


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet multiple conditional statement...

2013-09-19 Thread John
How can I accomplish the following in puppet?

If /etc/file1 contains string abc  
   then copy SSHTemplate1 to /etc/ssh/ssh_config   copy SSHDTemplate1 to 
/etc/ssh/sshd_config
else if /etc/file1 contains string xyz
  then copy SSHtemplate2 to /etc/ssh/ssh_config  copy SSHDTemplate2 to 
/etc/ssh/sshd_config
else copy SSHtemplate3 to /etc/ssh/ssh_config  copy SSHDTemplate3 to 
/etc/ssh/sshd_config

I have to apply this logic multiple operating systems in a Puppet script

So far this is what I have...

class ssh {
case $::operatingsystem {
  'AIX': {
$owner = 'root'
$group = 'system'
}
  'FreeBSD': {
$owner = 'root'
$group = 'wheel'
}
  default: {
$owner = 'root'
$group = 'root'
  }
}

file { '/etc/ssh/sshd_config':
  ensure = present,
  owner = $owner,
  group = $group,
  mode = '0644',
  backup = false,
  content = template(ssh/etc/ssh/sshd_config.erb),
}

file { '/etc/ssh/ssh_config':
  ensure = present,
  owner = $owner,
  group = $group,
  mode = '0644',
  backup = false,
  content = template(ssh/etc/ssh/ssh_config.erb),
}

file { '/etc/issue.net':
  ensure = present,
  owner = $owner,
  group = $group,
  mode = '0644',
  backup = false,
  content = template(motd/etc/issue.erb),
}
}

Does that look right?  And how to add the the conditional logic above to 
this template?  Thanks in advance!!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet 3.2 : warnings

2013-09-19 Thread Sergey Arlashin
HI!
I see a couple of warnings in master.log on puppetmaster  server each time 
puppet agent runs. 
But when I run puppet agent manually by executing puppet agent --server 
puppet.site --verbose --no-daemonize --onetime  I don't see any warnings in 
its output. 
Is it possible to make puppet agent show warnings in its output while running 
from command line? 

--
Best regards,
Sergey

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Can't parse for environment production

2013-09-19 Thread TimV
 

Hi -

We’ve got a small test puppet setup that I am trying to get working.  2 
hosts, a puppetmaster server and a client machine, both running version 
2.6.18.  The host has been added, and it’s certificate signed by the 
puppetmaster server. 

Using some of the examples from the Pro Puppet book (Turnball), I setup a 
site.pp and nodes.pp under /etc/puppet/manifests 

Then, under /etc/puppet/modules, I have some reciepes for ssh, motd, sudo, 
ntp etc. 

I should state that a number of months ago, this was working (at least on 
the one test host machine I had). 

I’ve come back to revisit this project and continue learning, but am now 
getting error messages.  I can still add hosts, and get their certs signed, 
but if, I run “puppet agent --test --noop” 

I get the following error message:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: Permission denied - 
/etc/puppet/manifests/nodes.pp at /etc/puppet/manifests/site.pp:2 on node 
blah.blah.blah 

warning: Not using cache on failed catalog

err: Could not retrieve catalog; skipping run

site.pp simply ha: 

import 'nodes.pp'

my nodes.pp has: 
class base { 

  include sudo, ntp, motd, ssh, kerberos

}

 

node ‘host1.example.com’ {

  include base

}

 

node 'host2.example.com' {

  include base

}

 

In terms of permissions, I have the puppet user with RWX on these files, 
and directories.

 

Any ideas?  Something change after I updated things?  

 

Thanks.

 

Tim

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Array being flattened

2013-09-19 Thread Darin Perusich
Hello All,

I've run into an issue where an array that's being passed into a
defined type is being flattened when it's inclosed in double quotes
and I'm not sure how to get around this. This is happening a the
pdxcat/amanda module and I've raised an github issues for this but
wanted to query the community as a whole. The issue and my branch of
the code are below.

The amanda::server or amanda::configs class/defined type allow you to
populate amanda configuration directories from files,
/etc/amanda/$configs, by setting configs = [ daily, weekly ] in
the manifest. In my defined type, amanda::disklist, the parameter
$configs needs to be used to set the correct target path to a file
which I'm using contact::fragment to modify. When $configs is a single
value, say daily, everything works as expected. But then $configs is
an array, daily and weekly, it's flattened to dailyweekly which
results in an Invalid relationship: error.

Can anyone provide some guidance on how to get around this? I've been
banging on this for a few days and my heads really starting to hurt.

define amanda::disklist (
$configs,
$diskdevice = undef,
$dumptype,
$ensure = present,
$interface  = undef,
$order  = 20,
$spindle= undef
) {
include amanda::params
include amanda::virtual

concat::fragment { amanda::disklist/$title:
target  = $amanda::params::configs_directory/$configs/disklist,
ensure  = $ensure,
order   = $order,
content = $fqdn $name $diskdevice $dumptype $spindle $interface\n,
tag = amanda_dle,
}

https://github.com/pdxcat/puppet-module-amanda/issues/12
https://github.com/deadpoint/puppet-amanda/tree/disklist

--
Later,
Darin

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Adding nodes to groups automatically

2013-09-19 Thread davetst
Is there a way I can replicate the background task that automatically adds 
all new nodes to the 'default' group in puppet enterprise console?  I'd 
like the process to add nodes based on the osfamily fact.  For example, if 
the node is osfamily=RedHat add to group named RedHat.

From some reading I know there are rake tasks but I don't see how to have 
them add the node based on osfamily fact.  I also looked into Heira and 
know that it would do a better job of classifying nodes but I'm not quite 
ready to port my modules over to it yet.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Retrieving Hiera arrays from init.pp

2013-09-19 Thread Jeremiah Jester
I've been able to retrieve data from hiera via init.pp from a basic 
variable. However, when i try and pull an associative array from hiera, I'm 
unable to get the data. I've verified that my yaml syntax is correct by 
running hiera via the command line:

*hiera yaml file
 
log_special::log_vars:
a: - 'jklkl'
   - 'test'

*heira via cmd line
[jjest@puppet-master-t1 templates]$ hiera log_special::log_vars 
hostname=puppet-client-t1
{a=[jklkl, test]}

  
Anyone know how to pull and parse this from init.pp? Precise code would be 
helpful.

Thanks,
JJ

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] b64_zlib_yaml errros after server upgrade to

2013-09-19 Thread Andrei-Florian Staicu
Thanks.
Unfortunately I cannot further post any logs easily. That is the only
puppet master instance that I currently run. I could upgrade and retry per
request though.
One more piece of information: the puppet master runs under passenger (I
don't know how to enable --trace in this case).


On Thu, Sep 19, 2013 at 4:02 PM, Henrik Nicolaisen h...@esoftsystems.comwrote:



 On Thursday, September 19, 2013 12:45:43 AM UTC+2, Patrick Carlisle wrote:


 On Tue, Sep 17, 2013 at 1:14 AM, Andrei-Florian Staicu 
 andrei...@gmail.com wrote:

 Any idea if this is a recognized bug?


 I don't think it is. Please file a bug report at projects.puppetlabs.comand 
 we can investigate this further.


 I created it here https://projects.puppetlabs.com/issues/22614

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Beware of programmers who carry screwdrivers!

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: rspec-puppet require syntax

2013-09-19 Thread Guy Knights
Does anyone have any feedback on this? I found at least one example 
(eg. 
https://genuxation.com/wiki/index.php/RSpec_tests_for_puppet_modules#Specifying_parameters_used_within_the_class)
 
but it didn't work for me.

Thanks,
Guy

On Tuesday, 17 September 2013 10:05:26 UTC-7, Guy Knights 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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Array being flattened

2013-09-19 Thread gh
On 9/19/13 4:13 PM, Darin Perusich wrote:
 Hello All,
 
 I've run into an issue where an array that's being passed into a
 defined type is being flattened when it's inclosed in double quotes
 and I'm not sure how to get around this. This is happening a the
 pdxcat/amanda module and I've raised an github issues for this but
 wanted to query the community as a whole. The issue and my branch of
 the code are below.
 
 The amanda::server or amanda::configs class/defined type allow you to
 populate amanda configuration directories from files,
 /etc/amanda/$configs, by setting configs = [ daily, weekly ] in
 the manifest. In my defined type, amanda::disklist, the parameter
 $configs needs to be used to set the correct target path to a file
 which I'm using contact::fragment to modify. When $configs is a single
 value, say daily, everything works as expected. But then $configs is
 an array, daily and weekly, it's flattened to dailyweekly which
 results in an Invalid relationship: error.
 
 Can anyone provide some guidance on how to get around this? I've been
 banging on this for a few days and my heads really starting to hurt.
 
 define amanda::disklist (
 $configs,
 $diskdevice = undef,
 $dumptype,
 $ensure = present,
 $interface  = undef,
 $order  = 20,
 $spindle= undef
 ) {
 include amanda::params
 include amanda::virtual
 
 concat::fragment { amanda::disklist/$title:
 target  = $amanda::params::configs_directory/$configs/disklist,
 ensure  = $ensure,
 order   = $order,
 content = $fqdn $name $diskdevice $dumptype $spindle $interface\n,
 tag = amanda_dle,
 }
 
 https://github.com/pdxcat/puppet-module-amanda/issues/12
 https://github.com/deadpoint/puppet-amanda/tree/disklist
 
 --
 Later,
 Darin
 

This is an issue with type casting. The target parameter[1] is using a
string and I think that you believe that multiple concat::fragments
should get called, one for each element in the array, which is not going
to happen.

If that is the functionality you want, then $configs[2] should stay a
string and not allow arrays. You can use create_resources()[3] to call
amanda::disklist multiple times, which from your issue[4], is what I
believe your intention is.

Here is a gist[5] to demonstrate with YAML files that you might place in
Hiera.

[1] -
https://github.com/deadpoint/puppet-amanda/blob/disklist/manifests/disklist.pp#L14
[2] -
https://github.com/deadpoint/puppet-amanda/blob/disklist/manifests/disklist.pp#L2
[3] -
http://docs.puppetlabs.com/references/latest/function.html#createresources
[4] - https://github.com/pdxcat/puppet-module-amanda/issues/12
[5] - https://gist.github.com/ghoneycutt/6627040

BR,
-g

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Can't parse for environment production

2013-09-19 Thread llowder
Comments inline.

On Thursday, September 19, 2013 10:19:45 AM UTC-5, TimV wrote:

 Hi -

 We’ve got a small test puppet setup that I am trying to get working.  2 
 hosts, a puppetmaster server and a client machine, both running version 
 2.6.18.  The host has been added, and it’s certificate signed by the 
 puppetmaster server. 


That is a VERY old version, and has been EOL'd. I would recommend upgrading 
using the puppetlabs repos if at all possible.

 

 Using some of the examples from the Pro Puppet book (Turnball), I setup a 
 site.pp and nodes.pp under /etc/puppet/manifests 

 Then, under /etc/puppet/modules, I have some reciepes for ssh, motd, sudo, 
 ntp etc. 

 I should state that a number of months ago, this was working (at least on 
 the one test host machine I had). 

 I’ve come back to revisit this project and continue learning, but am now 
 getting error messages.  I can still add hosts, and get their certs signed, 
 but if, I run “puppet agent --test --noop” 

 I get the following error message:

 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Could not parse for environment production: Permission denied - 
 /etc/puppet/manifests/nodes.pp at /etc/puppet/manifests/site.pp:2 on node 
 blah.blah.blah 

Check the permissions on your $modulepath, it looks like the user that 
puppet is running as (typically `puppet` for the Open Source version) 
cannot read the modules.

You can easily check them all at once with:

*for x in $(sudo puppet config print modulepath --mode mode | sed -e 
s/:/ /g); do ls -lR $x; done

*
 

 warning: Not using cache on failed catalog

 err: Could not retrieve catalog; skipping run

 site.pp simply ha: 

 import 'nodes.pp'

 my nodes.pp has: 
 class base { 

   include sudo, ntp, motd, ssh, kerberos

 }

  

 node ‘host1.example.com’ {

   include base

 }

  

 node 'host2.example.com' {

   include base

 }

  

 In terms of permissions, I have the puppet user with RWX on these files, 
 and directories.

  

 Any ideas?  Something change after I updated things?  

  

 Thanks.

  

 Tim


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Using file and mount more efficiently

2013-09-19 Thread Forrie
This is something I've been concerned about -- and how to properly approach 
this.

For example, we can use Puppet to ensure that the directories (mount 
points) exist and that the entries are present in /etc/fstab -- but I grow 
very concerned about automating the NFS-mount part of this.

I don't think we'd want to use autofs, as the namespace isn't visible 
unless you cd directly into it.   We nixed this idea with /home, for 
example.

What would be the safest ideal way to approach this?


Thanks!




On Sunday, August 25, 2013 2:57:24 AM UTC-4, jcbollinger wrote:


 On Sunday, August 25, 2013 1:54:09 AM UTC-5, jcbollinger wrote:

 Therefore, unless you do something to ensure your FS unmounted before the 
 File is applied, the File will sometimes manage the local directory, but 
 other times manage the remote one.  That may be tolerable, [...]

  
 I should clarify: it probably is NOT tolerable to unmount and remount the 
 FS during every Puppet run, but it might be tolerable to have Puppet manage 
 the remote filesystem root when that is already mounted.
  
  
 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Oxford Global Resources is hiring for a devops role

2013-09-19 Thread Joe FitzGerald
Hello,

Oxford Global Resources is a staffing company currently in the process of 
replacing the legacy system that runs the day-to-day operations (a home 
grown CRM system basically) of the business.  My team is building the new 
application and we're accelerating our push to production.  We are looking 
for a devops person to support our development team as well as the existing 
infrastructure group as we continue to build and deploy the system.  It is 
a great opportunity to help build out a Devops group for a multi-billion 
dollar company.  The project is incredibly high-profile within the company 
(board level exposure) and is poised for tremendous success; our team is 
driving new technology adoption throughout the enterprise -- come be part 
of it!

Our team is primarily located in Beverly, MA but our corporate IT 
infrastructure group is based in Calabasas, CA and for the right candidate, 
we may consider other arrangements if neither of those locations work for 
you.

Please contact me if you are interested in applying or have questions.

Joe

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Retrieving Hiera arrays from init.pp

2013-09-19 Thread Chad Huneycutt
I'm pretty sure we need more information than that.

1. Is puppet using the proper hiera.yaml?  The command line client at
least used to use a different config than puppet (/etc/hiera.yaml vs
/etc/puppet/hiera.yaml).  It sounds like you have this right, if you
are able to pull basic variables from your data files.

2. Are you sure that hiera is not working?  What have you tried, and
what happened when you tried it?

Have you looked at http://docs.puppetlabs.com/hiera/1/index.html ?
There are examples there.

- Chad

On Thu, Sep 19, 2013 at 11:53 AM, Jeremiah Jester
jeremiahjes...@gmail.com wrote:
 I've been able to retrieve data from hiera via init.pp from a basic
 variable. However, when i try and pull an associative array from hiera, I'm
 unable to get the data. I've verified that my yaml syntax is correct by
 running hiera via the command line:

 *hiera yaml file

 log_special::log_vars:
 a: - 'jklkl'
- 'test'

 *heira via cmd line
 [jjest@puppet-master-t1 templates]$ hiera log_special::log_vars
 hostname=puppet-client-t1
 {a=[jklkl, test]}


 Anyone know how to pull and parse this from init.pp? Precise code would be
 helpful.

 Thanks,
 JJ

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
Chad M. Huneycutt

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Array being flattened

2013-09-19 Thread jcbollinger


On Thursday, September 19, 2013 9:13:59 AM UTC-5, Darin Perusich wrote:

 Hello All, 

 I've run into an issue where an array that's being passed into a 
 defined type is being flattened when it's inclosed in double quotes 
 and I'm not sure how to get around this.



You get around it by not referencing the variable inside double quotes.  
Putting the variable reference inside double quotes indicates that you want 
to interpolate its (one) string value into the (one) larger string.

 

 This is happening a the 
 pdxcat/amanda module and I've raised an github issues for this but 
 wanted to query the community as a whole. The issue and my branch of 
 the code are below. 

 The amanda::server or amanda::configs class/defined type allow you to 
 populate amanda configuration directories from files, 
 /etc/amanda/$configs, by setting configs = [ daily, weekly ] in 
 the manifest. In my defined type, amanda::disklist, the parameter 
 $configs needs to be used to set the correct target path to a file 
 which I'm using contact::fragment to modify. When $configs is a single 
 value, say daily, everything works as expected. But then $configs is 
 an array, daily and weekly, it's flattened to dailyweekly which 
 results in an Invalid relationship: error. 



What is the desired behavior in this case?  Choose the first element?  The 
last?  A random one?  Perhaps do something for each element?

 


 Can anyone provide some guidance on how to get around this? I've been 
 banging on this for a few days and my heads really starting to hurt. 

 define amanda::disklist ( 
 $configs, 
 $diskdevice = undef, 
 $dumptype, 
 $ensure = present, 
 $interface  = undef, 
 $order  = 20, 
 $spindle= undef 
 ) { 
 include amanda::params 
 include amanda::virtual 

 concat::fragment { amanda::disklist/$title: 
 target  = $amanda::params::configs_directory/$configs/disklist, 
 ensure  = $ensure, 
 order   = $order, 
 content = $fqdn $name $diskdevice $dumptype $spindle 
 $interface\n, 
 tag = amanda_dle, 
 } 

 https://github.com/pdxcat/puppet-module-amanda/issues/12 
 https://github.com/deadpoint/puppet-amanda/tree/disklist 



Your definition seems generally ill-conceived, or at least ill-named, in 
the face of a $configs variable containing multiple elements.  The only 
sensible thing I can see in that case would be for multiple files to be 
managed, whereas your defined type represents only one.

What is the relationship between your defined type and amanda::dle?  The 
latter appears to be doing about the same thing, but seems to get it 
right.  The key difference there is that amanda::dle makes use of the 
$configs array directly as a resource title.  When an array literal or an 
array-valued variable is used as a resource title, it serves as shorthand 
for multiple resource declarations, one for each array element, all with 
the same parameters.  This behavior is often leveraged for splitting arrays 
into multiple elements, just as amanda::dle does.


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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet requires second run to execute some catalog items.

2013-09-19 Thread Sam Tresler
Actually, that isn't going to work, I don't think.  I need to have some 
method of flagging the uninstalled packages as needing reinstallation mid 
puppet run, or I need aptitude to not uninstall them in the first place, or 
I need to I need puppet to get kicked off on a second run at the end of the 
first.  Of those I like the first or second options best. I'll do more 
digging, but would love to hear people's suggestions on this as well. 

On Thursday, September 19, 2013 9:58:21 AM UTC-4, Sam Tresler wrote:

 Ah. That makes a lot of sense. I'd noticed the php5-mysql 'upgrade' and 
 assumed I was getting an erroneous message, but if puppet thinks it is 
 doing that there is actually no difference in the aptitude commands between 
 an install and an upgrade.  The packages with names that match php5-common 
 *do* register as needing an upgrade at the beginning of the run, and are 
 actually caught and reinstalled mistakenly. Anything that doesn't need an 
 upgrade is never touched because it didn't need anything in the first 
 place. 

 My predecessor switched to running puppet non-daemonized on a 20m cron 
 job. And I think this would not be an issue in a daemonized mode (perhaps) 
 - as puppet would see the inconsistency faster, which is why I can find 
 NOTHING on google about a similar problem. 

 So, I think I'll proceed by having the php extensions without the same 
 versioning schema subscribe to the php5-common resource and (I'll have to 
 see what options are there) and check themselves again or kick off a second 
 puppet run immediately. 

 Thanks a ton. I had all the pieces but couldn't quite see it. 

 On Thursday, September 19, 2013 9:39:01 AM UTC-4, jcbollinger wrote:



 On Wednesday, September 18, 2013 3:01:49 PM UTC-5, Sam Tresler wrote:

 Hi, I've inherited a puppet setup for automating php installation and 
 extension management.  We're on Debian and we've encountered a strange 
 issue that I've traced down back to puppet I think. I've stripped back the 
 configuration and made the problem reproducible, logs and config pasted 
 below. 

 1. php5-common, php5-memcache, and php5-mysql are all installed. 
 2. php5-common and php5-mysql receive an update, say from 
 5.3.3-7+squeeze14 to 5.3.3-7+squeeze17
 3. Puppet runs and php5-common upgrade conflicts. Apt's first solution 
 removes php5-mysql and php5-memcache. 
 4. Puppet continues run and re-installs/upgrades php5-mysql. It skips 
 php5-memcache.
 5. On a subsequent run php5-memcache is installed again as expected. 

 This appears to only happen to packages that don't share the php5 
 version naming schema, but that may be just a clue, not a cause. e.g. 
 php5-memcache is 3.0.4-4+squeeze1. 



 Yes, that's a clue, not the cause.  Here's what I think is happening:

 Early in the run, before applying any resources, the Puppet agent 
 prefetches the installed apt packages.  This is a common behavior of 
 providers for many resource types where it is more efficient than loading 
 each declared resource's initial state individually.  Puppet thereafter 
 assumes that the data it has prefetched do not change except as the agent 
 itself explicitly changes them.  In particular, it will be caught quite by 
 surprise if one of the resources it has prefetched is no longer present on 
 the system when it comes time to apply it.

 If you look carefully at the log, you will see that it is not just 
 php5-memcache about which the agent is confused.  The log also says: 
 'php5-mysql 5.3.3-7+squeeze14 is installed', which is no longer true at 
 the time that that message is emitted.  It happens that the result is 
 nevertheless what you want in that case, however, because the reason the 
 package was removed is correlated with the availability of a later version 
 of it.

 This explanation assumes that the latest available version of 
 php5-memcache is the same one that was already installed at the start of 
 the Puppet run.  In that case, however, it is a mystery beyond my 
 understanding why that package needed to be removed for the update to 
 php5-common to proceed, and it was not automatically reinstalled, yet it 
 could later be reinstalled manually.


 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Retrieving Hiera arrays from init.pp

2013-09-19 Thread Jeremiah Jester
Chad,

Thanks for the reply. I am using /etc/puppet/heiradata for the
location of all my hiera files.

[root@puppet-master-t1 puppet]# ls hieradata/
defaults.yaml  global.yaml  groups  hosts

Referencing non hashed/array variables from init.pp works. However, I
cannot get the array variable $log_status2 - it is being returned as a
string. I've included a snip of my init.pp file with comments to give
more details. I've looked at the limited hiera docs included the one
you sent, I'm clearly doing something wrong.

Appreciate the help.
JJ

class log_special
(
#log_special::log_vars: test
$log_vars=log_vars,

#log_special::log_vars2:
#b: 'fdsa'
#c: 'fds'
$log_vars2=hiera_hash('log_vars'),
$log_vars2=$log_vars2['b']
)
{
  exec{log_vars: command= /bin/echo '${log_vars}', logoutput=true;}
  #Debug: Executing '/bin/echo 'test'
  exec{log_vars2: command= /bin/echo '${log_vars2}', logoutput=true;}
  #Debug: Executing '/bin/echo 'bfdsacfds''
}


On Thu, Sep 19, 2013 at 10:02 AM, Chad Huneycutt
chad.huneyc...@gmail.com wrote:
 I'm pretty sure we need more information than that.

 1. Is puppet using the proper hiera.yaml?  The command line client at
 least used to use a different config than puppet (/etc/hiera.yaml vs
 /etc/puppet/hiera.yaml).  It sounds like you have this right, if you
 are able to pull basic variables from your data files.

 2. Are you sure that hiera is not working?  What have you tried, and
 what happened when you tried it?

 Have you looked at http://docs.puppetlabs.com/hiera/1/index.html ?
 There are examples there.

 - Chad

 On Thu, Sep 19, 2013 at 11:53 AM, Jeremiah Jester
 jeremiahjes...@gmail.com wrote:
 I've been able to retrieve data from hiera via init.pp from a basic
 variable. However, when i try and pull an associative array from hiera, I'm
 unable to get the data. I've verified that my yaml syntax is correct by
 running hiera via the command line:

 *hiera yaml file

 log_special::log_vars:
 a: - 'jklkl'
- 'test'

 *heira via cmd line
 [jjest@puppet-master-t1 templates]$ hiera log_special::log_vars
 hostname=puppet-client-t1
 {a=[jklkl, test]}


 Anyone know how to pull and parse this from init.pp? Precise code would be
 helpful.

 Thanks,
 JJ

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.



 --
 Chad M. Huneycutt

 --
 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/3A5F9Wh6RdY/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Array being flattened

2013-09-19 Thread Darin Perusich
On Thu, Sep 19, 2013 at 3:33 PM, jcbollinger john.bollin...@stjude.org wrote:


 On Thursday, September 19, 2013 9:13:59 AM UTC-5, Darin Perusich wrote:

 Hello All,

 I've run into an issue where an array that's being passed into a
 defined type is being flattened when it's inclosed in double quotes
 and I'm not sure how to get around this.



 You get around it by not referencing the variable inside double quotes.
 Putting the variable reference inside double quotes indicates that you want
 to interpolate its (one) string value into the (one) larger string.

Yes I'm aware.



 This is happening a the
 pdxcat/amanda module and I've raised an github issues for this but
 wanted to query the community as a whole. The issue and my branch of
 the code are below.

 The amanda::server or amanda::configs class/defined type allow you to
 populate amanda configuration directories from files,
 /etc/amanda/$configs, by setting configs = [ daily, weekly ] in
 the manifest. In my defined type, amanda::disklist, the parameter
 $configs needs to be used to set the correct target path to a file
 which I'm using contact::fragment to modify. When $configs is a single
 value, say daily, everything works as expected. But then $configs is
 an array, daily and weekly, it's flattened to dailyweekly which
 results in an Invalid relationship: error.



 What is the desired behavior in this case?  Choose the first element?  The
 last?  A random one?  Perhaps do something for each element?

The desired behavior is to add/remove entries in the disklist file for
each $configs specified. For example your daily backups might run
weekdays and only do incremental dumps, but the weekly backups run
on weekends and are archived and sent off site.




 Can anyone provide some guidance on how to get around this? I've been
 banging on this for a few days and my heads really starting to hurt.

 define amanda::disklist (
 $configs,
 $diskdevice = undef,
 $dumptype,
 $ensure = present,
 $interface  = undef,
 $order  = 20,
 $spindle= undef
 ) {
 include amanda::params
 include amanda::virtual

 concat::fragment { amanda::disklist/$title:
 target  = $amanda::params::configs_directory/$configs/disklist,
 ensure  = $ensure,
 order   = $order,
 content = $fqdn $name $diskdevice $dumptype $spindle
 $interface\n,
 tag = amanda_dle,
 }

 https://github.com/pdxcat/puppet-module-amanda/issues/12
 https://github.com/deadpoint/puppet-amanda/tree/disklist



 Your definition seems generally ill-conceived, or at least ill-named, in the
 face of a $configs variable containing multiple elements.  The only sensible
 thing I can see in that case would be for multiple files to be managed,
 whereas your defined type represents only one.

I thought about creating multiple files but values in amanda.conf are
not managed by puppet, other than being copied to the server, so the
admin would need to know to add/set disklist value which is typically
not present. I see this as being a future enhancement to the module.

 What is the relationship between your defined type and amanda::dle?  The
 latter appears to be doing about the same thing, but seems to get it right.
 The key difference there is that amanda::dle makes use of the $configs array
 directly as a resource title.  When an array literal or an array-valued
 variable is used as a resource title, it serves as shorthand for multiple
 resource declarations, one for each array element, all with the same
 parameters.  This behavior is often leveraged for splitting arrays into
 multiple elements, just as amanda::dle does.

With amanda::dle I was trying another approach, but it causes
duplicate definitions so I wouldn't say it got it right;-)

--
Later,
Darin

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-09-19 Thread Rob Reynolds
Henrik posted some updates/fixes to his examples. Can you check that first?


On Wed, Sep 18, 2013 at 10:57 AM, Igor Berger codewiz...@gmail.com wrote:

 Any ideas?


 On Monday, September 16, 2013 11:30:42 AM UTC-4, Igor Berger wrote:

 Hello,

 I'm running Puppet agent stand-alone on Windows.

 I got data-in-modules working. However, no matter what I put into the
 module hiera.yaml,
 I can only override the defaults from common.yaml by osfamily (and not,
 e.g., by environment).

 In the setup below the following command outputs:

 puppet apply --binder -e notice lookup ('my_key') --environment=local
 Notice: Scope(Class[main]): windows-value
 Notice: Compiled catalog for myhostname in environment local in 1.40
 seconds

 And if I delete the osfamily directory, the same command outputs
 common-value.

 So, even though osfamily is not part of the hierarchy, it's used to
 override the common value.
 Conversely, environment is part of the hierarchy, but it's not used.

 Did I miss anything?

 Thanks,
 Igor.


 Module structure:

 my_module/
 hiera.yaml
 data/
 common.yaml
 environment/
 local.yaml
 osfamily/
 windows.yaml


 hiera.yaml contains:

 ---
 version: 2
 hierarchy:
   [
['environment', '${environment}', 'data/environment/${**
 environment}'],
['common', 'true', 'data/common']
   ]


 data/common.yaml contains:

 ---
 my_key: 'common-value'


 data/osfamily/windows.yaml contains:

 ---
 my_key: 'windows-value'


 data/environment/local.yaml contains:

 ---
 my_key: 'local-value'

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 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

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet module install simondean/iis gives error Error: cert already in hash table

2013-09-19 Thread Rob Reynolds
Are your results of `puppet module install simondaen/iis --debug --trace`
similar to what the others were getting?


On Wed, Sep 18, 2013 at 1:52 PM, Samuel Huang samhuan...@gmail.com wrote:

 Yeah I rebooted, and it still didn't work.


 On Monday, September 16, 2013 1:40:34 PM UTC-7, Rob Reynolds wrote:

 Yes, that is the one that I meant. I know you hate hearing this question,
 but did you reboot after you removed it (prior to module install) for full
 effect?


 On Mon, Sep 16, 2013 at 1:24 PM, Samuel Huang samhu...@gmail.com wrote:

 If what you mean by Machine store is the Local Computer, I just deleted
 it from both Machine and Current User stores and still puppet module
 install does not work. Here's a screenshot of it appearing in the Machine
 store.


 On Sunday, September 15, 2013 8:42:24 PM UTC-7, Rob Reynolds wrote:

 Can you determine if the cert is also under Machine certificate store
 and not just the Current User certificate store?


 On Fri, Sep 13, 2013 at 1:27 AM, Samuel Huang samhu...@gmail.comwrote:

 I deleted the cert you mentioned *(thatwte-timestamping.png)*, but I
 still have the same error everyone's been mentioning *
 (module-install-fails.png)*. Any help please?

 Sam


 On Sunday, August 18, 2013 7:59:04 PM UTC-7, Robert Redgwell wrote:

 For what it's worth, I had the same problem and figured out the
 particular cert on Windows 7 (64bit) that was causing the issue:

 --**--***
 ***--
 [Subject]
   CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte,
 L=Durbanville, S=Western Cape, C=ZA

 [Issuer]
   CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte,
 L=Durbanville, S=Western Cape, C=ZA

 [Serial Number]
   00

 [Not Before]
   1/01/1997 1:00:00 p.m.

 [Not After]
   1/01/2021 12:59:59 p.m.

 [Thumbprint]
   BE36A4562FB2EE05DBB3D32323ADF4**45084ED656
 --**--***
 ***--

 I found it under Trusted Root Certification Authorities.
 After deleting that, I no longer had the module/cert issue.

 On Wednesday, 17 July 2013 07:54:02 UTC+12, Josh Cooper wrote:




 On Tue, Jul 16, 2013 at 11:19 AM, Arno den Uijl 
 arnod...@gmail.comwrote:

 I thought i tried the debug and trace options but i this trace was
 new for me. I looked through the code and I think that it was caused 
 by the
 fact that there were some certificates installed with the same name. I
 deleted some from my certificate store and now it runs correct.

 Thanks for the help. I do think that this can be an issue for more
 people.


 I didn't realize MS cert store could contain duplicates. We should
 be more defensive of this, in general, to ensure the failure to add one
 cert doesn't stop puppet from running:

 begin
   add_cert(x509)
 rescue OpenSSL::X509::StoreError = detail
   Puppet.warning Failed to add certificate
 '#{x509.subject}'
 end

 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save
 25%!*

  --
 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-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out
 .




 --
 Rob Reynolds
 Developer, Puppet Labs

 Join us at PuppetConf 2014, September 23-24 in San Francisco

  --
 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-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




 --
 Rob Reynolds
 Developer, Puppet Labs

 Join us at PuppetConf 2014, September 23-24 in San Francisco

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Rob Reynolds
Developer, Puppet Labs

Join us at PuppetConf 2014, 

[Puppet Users] Facter value at Catalog compilation

2013-09-19 Thread Frederiko Costa
Hi,

I've got a facter shipped with a custom module. This factor returns the
version of a determined package. It returns nil if the package is not
installed yet.

When running for the first time, assuming the package is not installed, the
facter will be still nil. When referring to that facter in the manifest -
for example in a file resource - it fails, because it has been compiled
with a nil value. When the package is already installed, it works great.

Just out of curiosity, is there any workaround other than if/else
statements?

Thanks,
-frederiko

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Agent intermittent lock, ruby crashing (windows)

2013-09-19 Thread Rob Reynolds
Jose,
It appears you are not the only one that has seen this -
http://projects.puppetlabs.com/issues/21109
Would you mind adding your comments to the ticket?


On Tue, Sep 3, 2013 at 12:22 PM, Jose Cambronero jcambron...@gmail.comwrote:

 Hi we're noticing in our environment intermittent windows agents becoming
 unresponsive and it's because of the lock file not being deleted.
 We are installing Puppet agent using the msi file, version 3.0.1.
 * Something that caught our attention is that the agents that have locked
 have been unchanged for a period of time.

 After investigating the Application event log, we are seeing the following
 2 errors:

 Log Name:  Application
 Source:Application Error
 Date:  9/3/2013 9:50:59 AM
 Event ID:  1000
 Task Category: (100)
 Level: Error
 Keywords:  Classic
 User:  N/A
 Computer:
 Description:
 Faulting application name: ruby.exe, version: 1.8.7.370, time stamp:
 0x4fede15f
 Faulting module name: msvcrt-ruby18.dll, version: 1.8.7.370, time stamp:
 0x4feddff4
 Exception code: 0x4015
 Fault offset: 0x00013152
 Faulting process id: 0x938
 Faulting application start time: 0x01cea8c5ae246efa
 Faulting application path: C:\Program Files (x86)\Puppet
 Labs\Puppet\sys\ruby\bin\ruby.exe
 Faulting module path: C:\Program Files (x86)\Puppet
 Labs\Puppet\sys\ruby\bin\msvcrt-ruby18.dll


 Log Name:  Application
 Source:Application Error
 Date:  9/3/2013 9:51:00 AM
 Event ID:  1000
 Task Category: (100)
 Level: Error
 Keywords:  Classic
 User:  N/A
 Computer:
 Description:
 Faulting application name: ruby.exe, version: 1.8.7.370, time stamp:
 0x4fede15f
 Faulting module name: ADVAPI32.DLL, version: 6.1.7601.17514, time stamp:
 0x4ce7b706
 Exception code: 0xc005
 Fault offset: 0x000149e5
 Faulting process id: 0x938
 Faulting application start time: 0x01cea8c5ae246efa
 Faulting application path: C:\Program Files (x86)\Puppet
 Labs\Puppet\sys\ruby\bin\ruby.exe
 Faulting module path: C:\Windows\syswow64\ADVAPI32.DLL


 Any suggestions as per what could be causing this issue and how to resolve
 it?
 BTW, if we manually delete the lock file then the agent reports back to
 the Puppet Master just fine.

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 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

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Need help with defining same package resource in two modules

2013-09-19 Thread Ryan Coleman
On Mon, Sep 16, 2013 at 10:49 PM, Mani Devarajan manidevara...@gmail.comwrote:

 How do i overcome this issue to complete the workflow of module B in both
 cases (where A is enabled or disabled)


Mani, virtual resources will get the job done but may be heavy-handed for
your use case. If you want something a little simpler, check out the
ensure_resource function provided by the puppetlabs/stdlib module (search
the page for ensure_resource). http://forge.puppetlabs.com/puppetlabs/stdlib

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


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

2013-09-19 Thread Simon Y
I just ran into this exact same problem. It turned out to be SELinux 
preventing Apache from loading the Phusion Passenger watchdog:

[Thu Sep 19 18:53:32 2013] [error] *** Passenger could not be initialized 
because of this error: Unable to start the Phusion Passenger watchdog 
(/usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/agents/PassengerWatchdog): 
Permission denied (13)

I temporarily put SELinux into permissive mode like this:

echo 0 /selinux/enforce


Then restarted Apache. No more Passenger initialization error, and the 
puppet agent is now working fine.

I'm not yet sure exactly how to fix this properly (i.e. configuring 
SELinux to allow Apache to load the file), but I'll leave that as an 
exercise for the reader :-)

Hope it helps!

Simon.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet module install simondean/iis gives error Error: cert already in hash table

2013-09-19 Thread Sam Huang
yes


On Thu, Sep 19, 2013 at 1:08 PM, Rob Reynolds r...@puppetlabs.com wrote:

 Are your results of `puppet module install simondaen/iis --debug --trace`
 similar to what the others were getting?


 On Wed, Sep 18, 2013 at 1:52 PM, Samuel Huang samhuan...@gmail.comwrote:

 Yeah I rebooted, and it still didn't work.


 On Monday, September 16, 2013 1:40:34 PM UTC-7, Rob Reynolds wrote:

 Yes, that is the one that I meant. I know you hate hearing this
 question, but did you reboot after you removed it (prior to module install)
 for full effect?


 On Mon, Sep 16, 2013 at 1:24 PM, Samuel Huang samhu...@gmail.comwrote:

 If what you mean by Machine store is the Local Computer, I just deleted
 it from both Machine and Current User stores and still puppet module
 install does not work. Here's a screenshot of it appearing in the Machine
 store.


 On Sunday, September 15, 2013 8:42:24 PM UTC-7, Rob Reynolds wrote:

 Can you determine if the cert is also under Machine certificate store
 and not just the Current User certificate store?


 On Fri, Sep 13, 2013 at 1:27 AM, Samuel Huang samhu...@gmail.comwrote:

 I deleted the cert you mentioned *(thatwte-timestamping.png)*, but I
 still have the same error everyone's been mentioning *
 (module-install-fails.png)*. Any help please?

 Sam


 On Sunday, August 18, 2013 7:59:04 PM UTC-7, Robert Redgwell wrote:

 For what it's worth, I had the same problem and figured out the
 particular cert on Windows 7 (64bit) that was causing the issue:

 --**--**
 --
 [Subject]
   CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte,
 L=Durbanville, S=Western Cape, C=ZA

 [Issuer]
   CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte,
 L=Durbanville, S=Western Cape, C=ZA

 [Serial Number]
   00

 [Not Before]
   1/01/1997 1:00:00 p.m.

 [Not After]
   1/01/2021 12:59:59 p.m.

 [Thumbprint]
   BE36A4562FB2EE05DBB3D32323ADF4**45084ED656
 --**--**
 --

 I found it under Trusted Root Certification Authorities.
 After deleting that, I no longer had the module/cert issue.

 On Wednesday, 17 July 2013 07:54:02 UTC+12, Josh Cooper wrote:




 On Tue, Jul 16, 2013 at 11:19 AM, Arno den Uijl arnod...@gmail.com
  wrote:

 I thought i tried the debug and trace options but i this trace was
 new for me. I looked through the code and I think that it was caused 
 by the
 fact that there were some certificates installed with the same name. I
 deleted some from my certificate store and now it runs correct.

 Thanks for the help. I do think that this can be an issue for more
 people.


 I didn't realize MS cert store could contain duplicates. We should
 be more defensive of this, in general, to ensure the failure to add one
 cert doesn't stop puppet from running:

 begin
   add_cert(x509)
 rescue OpenSSL::X509::StoreError = detail
   Puppet.warning Failed to add certificate
 '#{x509.subject}'
 end

 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount -
 save 25%!*

  --
 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-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out
 .




 --
 Rob Reynolds
 Developer, Puppet Labs

 Join us at PuppetConf 2014, September 23-24 in San Francisco

  --
 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-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




 --
 Rob Reynolds
 Developer, Puppet Labs

 Join us at PuppetConf 2014, September 23-24 in San Francisco

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit 

[Puppet Users] Re: rspec-puppet require syntax

2013-09-19 Thread Corey Osman
Have you tried:

*Class[ssl],Class[pcre3],Staging::Extract[nginx-1.4.1.tar.gz]*

or 

*Class[ssl],Class[pcre3],Staging__Extract[nginx-1.4.1.tar.gz]


Corey
*
On Tuesday, September 17, 2013 10:05:26 AM UTC-7, Guy Knights 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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] rspec-puppet require syntax

2013-09-19 Thread Dan Bode
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.comwrote:

 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+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.