[Puppet Users] Re: undefined method `use_ssl=' on Debian 7, Puppet Enterprise 3.0.0

2013-08-22 Thread Michael Richardson
Hi Mathias,
I'm experiencing a similar problem.  did you manage to resolve it?

Thanks,
Michael



On Saturday, 20 July 2013 00:35:42 UTC+10, Mathias Kaufmann wrote:
>
> Hi,
>
> I've tested puppet on Debian 7, 64bit. When I run "puppet node classify" I 
> get an error as shown below. Is this a configuration-problem or a bug?
>
> root@puppet:/etc/netboot# /opt/puppet/bin/puppet node classify 
> --enc-server=localhost --enc-port=443 --enc-auth-user=console 
> --enc-auth-passwd=password --node-group=app_server node-06.mydomain
>
>
> Error: undefined method `use_ssl=' for 
> #
> Error: Try 'puppet help node classify' for usage
>
> Thanks
> Mathias
>
>
>
>

-- 
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: [pe-users] trouble installing open source puppet client

2013-08-22 Thread Rahul Khengare
Hi Stuart,
   I think you have to downgrade your rubygems version- 2.0.6 and try to 
install puppet this might work.

Refer Following link for supported version of ruby,
http://docs.puppetlabs.com/guides/platforms.html#ruby-versions 


Thanks and Regards,
Rahul Khengare,
NTT DATA OSS-Center, Pune, India.


On Friday, August 16, 2013 6:05:24 AM UTC+5:30, Stuart Cracraft wrote:
>
> Redirected - need help. Please review and give me your collective thoughts.
> Encountering headwinds when trying to install Open Source Puppet *client*.
> The Puppet master and its client work fine and I don't see a lot of 
> differences to dig into.
> If you need more information than what I give in the logs and comments 
> below, please
> let me know.
>
>
> Begin forwarded message:
>
> *From: *Stuart Cracraft >
> *Date: *August 15, 2013 5:27:58 PM
> *To: *"pe-u...@puppetlabs.com " 
> 
> >
> *Subject: **[pe-users] trouble installing open source puppet client*
>
>  
> Trouble installing the client with
>  
>   yum install puppet
>  
>  
> Getting an error with a dependency by rubygem-json on rubygems.
>  
>  Forbidden when trying to do a general rubygems update.
>
>  
>
> gem list shows rake (10.1.0) and rubygems-update (2.0.6) as installed but
>
> gem update --system gives the above forbidden error. Proxy is open for
>
> this box for:
>
>  
>
>   *.puppetlabs.com
>
>   gems.rubyforge.org
>
>   *.rubygems.org
>
>  
>
> have tried http_proxy and HTTP_PROXY set to both the proxy's ip with 8080
>
> "some-ip:8080" and as http://some-ip:8080
>
>  curl -x proxyserverip:8080 http://puppetlabs.com and
>
> curl -x proxyserverip:8080
>
> Stuart
>  
>  
> Log:
>
> [root@ca-sna-bb01 rubygems-2.0.6]# yum install puppet
>
> Loaded plugins: product-id, rhnplugin, security, subscription-manager
>
> This system is not registered to Red Hat Subscription Management. You can 
> use subscription-manager to register.
>
> This system is receiving updates from RHN Classic or RHN Satellite.
>
> Setting up Install Process
>
> Resolving Dependencies
>
> --> Running transaction check
>
> ---> Package puppet.noarch 0:3.2.4-1.el6 will be installed
>
> --> Processing Dependency: facter >= 1.6.11 for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Processing Dependency: hiera >= 1.0.0 for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Processing Dependency: ruby(selinux) for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Running transaction check
>
> ---> Package facter.i386 1:1.7.2-1.el6 will be installed
>
> ---> Package hiera.noarch 0:1.2.1-1.el6 will be installed
>
> --> Processing Dependency: rubygem-json for package: 
> hiera-1.2.1-1.el6.noarch
>
> ---> Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
>
> --> Running transaction check
>
> ---> Package rubygem-json.x86_64 0:1.5.5-1.el6 will be installed
>
> --> Processing Dependency: rubygems for package: 
> rubygem-json-1.5.5-1.el6.x86_64
>
> --> Finished Dependency Resolution
>
> Error: Package: rubygem-json-1.5.5-1.el6.x86_64 (puppetlabs-deps)
>
>Requires: rubygems
>
> You could try using --skip-broken to work around the problem
>
> You could try running: rpm -Va --nofiles --nodigest
>
> [root@ca-sna-bb01 rubygems-2.0.6]# gem update --system
>
> ERROR:  While executing gem ... (Net::HTTPServerException)
>
> 403 "Forbidden"
>
> [root@ca-sna-bb01 rubygems-2.0.6]# echo $http_proxy
>
> http://some-ip-here(1.2.3.4,etc.):8080
>
> [root@ca-sna-bb01 rubygems-2.0.6]# echo $HTTP_PROXY
>
>  
>
> [root@ca-sna-bb01 rubygems-2.0.6]# ruby setup.rb
>
> RubyGems 2.0.6 installed
>
> Installing ri documentation for rubygems-2.0.6
>
> /usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during 
> another chdir block
>
> /usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during 
> another chdir block
>
> : 
>
> :
>
> :
>
>
> --
>
>  
>
> RubyGems installed the following executables:
>
> /usr/bin/gem
>
>  
>
> Ruby Interactive (ri) documentation was installed. ri is kind of like man
>
> pages for ruby libraries. You may access it like this:
>
>   ri Classname
>
>   ri Classname.class_method
>
>   ri Classname#instance_method
>
> If you do not wish to install this documentation in the future, use the
>
> --no-document flag, or set it as the default in your ~/.gemrc file. See
>
> 'gem help env' for details.
>
>  
>
> [root@ca-sna-bb01 rubygems-2.0.6]#
>
>  
>  
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Enterprise Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pe-users+u...@puppetlabs.com .
> Visit this group at 
> http://groups.google.com/a/puppetlabs.com/group/pe-users/.
>
>

-- 
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...@

[Puppet Users] Unable to submit report to http://localhost:3000/reports/upload [401] Authorization Required

2013-08-22 Thread Salvador Priego Sácnhez
Hi,

I'm having some troubles related with reports. 
Catalogs are updated between server and clients but I cannot submit reports 
because of the 401 error. All is caused by the security that I had to put 
and I don't know how to solve it.

Anybody knows how to fix it?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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] Could not parse for environment production: Cannot assign to variables in other namespaces

2013-08-22 Thread JeremyCampbell
We're trying to set a role variable in one of our role classes i.e.

class role::nameserver {
  
  $::role = 'nameserver'

  include profile::baseline
}

however we get the following error

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: Cannot assign to variables in 
other namespaces

We do not get the error if we just use

 $role = 'nameserver'

Does anyone understand what is causing this?

-- 
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: Unable to submit report to http://localhost:3000/reports/upload [401] Authorization Required

2013-08-22 Thread Wikram Patankar
Hi,

I had faced the same issue when I was configuring puppet.

what are the contents of your /etc/puppet/auth.conf file ?

Wikram

On Thursday, August 22, 2013 1:25:27 PM UTC+5:30, Salvador Priego Sácnhez 
wrote:
>
> Hi,
>
> I'm having some troubles related with reports. 
> Catalogs are updated between server and clients but I cannot submit 
> reports because of the 401 error. All is caused by the security that I had 
> to put and I don't know how to solve it.
>
> Anybody knows how to fix it?
>
> Thanks in advance.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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 parse for environment production: Cannot assign to variables in other namespaces

2013-08-22 Thread badgerious
Take a look at the last paragraph here: 
http://docs.puppetlabs.com/puppet/3/reference/lang_variables.html#assignment

$role = 'nameserver'

assigns a variable within the 'role::nameserver' namespace (allowed), while 

$::role = 'nameserver'

assigns a top level variable (not allowed). 

Eric

On Thursday, August 22, 2013 6:04:39 AM UTC-5, JeremyCampbell wrote:
>
> We're trying to set a role variable in one of our role classes i.e.
>
> class role::nameserver {
>   
>   $::role = 'nameserver'
>
>   include profile::baseline
> }
>
> however we get the following error
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not parse for environment production: Cannot assign to variables in 
> other namespaces
>
> We do not get the error if we just use
>
>  $role = 'nameserver'
>
> Does anyone understand what is causing this?
>

-- 
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] hiera and defaults

2013-08-22 Thread Igor Galić

Hi folks,

I just managed to reproduce on a very small scale an issue
that's I've debugged for hours yesterday.

if we have a class:

class foo (
  $bar = hiera_array('foo::bar', $foo::params::bar),
) inherits foo::params {
  notify{ "foo::bar: ${bar}": }
}
class foo::params {
  # so we know if we're hitting defaults, or actually hiera!
  $bar = 'bar'
}

and a hierachiy:

%{::fqdn}
%{::common}

with the values:

--- # ::fqdn
foo::bar: baz

and
--- # ::common
foo::bar: quux

then hiera -a will deliever [ 'baz', 'quuux' ], but our notify will give
us 'baz'. Now, if we change the class:

class foo (
  $_bar = hiera_array('foo::bar', $foo::params::bar),
) inherits foo::params {
  notify{ "foo::bar: ${_bar}": }
}

we'll get the expected result, that is, notify will print:

   Notice: /Stage[main]/Foo/Notify[foo::bar: bazquux]/message: defined 
'message' as 'foo::bar: bazquux'

My question is simple: Is this a bug, or expected bahaviour?
if it's the latter, perhaps it should be documented some place.


So long,

-- i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

-- 
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] Notify via E-Mail

2013-08-22 Thread ytmp123
Hi guys,

I want the Puppet-Master to notify the admin via E-Mail: SMTP, SSL & 
Authentification is required. 
How can I do that with the help of "tagmail"?

Have you some clue for me?

-- 
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] "Storage to process this request is not available" when puppet runs on windows as a daemon.

2013-08-22 Thread derek murphy
I have a weird issue.  I'm using puppet 3.2.3 and I have a simple module to 
install an msi (module below).

If I run manually (from the start menu, or cmd using puppet agent - it 
works fine and installs.  If I let the 30 minute scheduled run happen - I 
get "Storage to process this request is not available".

Does anyone have any ideas what could cause this?  I don't see too much on 
the net about it and for the life of me can't figure it out.  
On a side note - every puppet run also seems to install notepad++ again (I 
get a Package[np]/ensure: created - which also isn't ideal as it makes this 
system always be in a changed state.

Any help people can give is appreciated.

class wintest {

  if ($operatingsystem == 'windows') {

package { 'np':

  ensure => installed,

  source => '\\files\Software\temp\npp.6.3.2.installer.msi',

  #provider => windows

}

  }

  else {

fail('This module is only supported on Windows')

  }

}

-- 
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] hiera and defaults

2013-08-22 Thread Felix Frank
Hi,

is this puppet 3? I shall suppose it is.

With the parameter name of "bar", you likely trigger the automagic hiera
lookup of foo::bar, which is (naturally) not done using hiera_array.
Apparently, this overrides the explicit call to hiera_array.

I'm not sure wether that's as designed, you may want to open a bug if in
doubt.

Cheers,
Felix

On 08/22/2013 03:01 PM, Igor Galić wrote:
> with the values:
> 
> --- # ::fqdn
> foo::bar: baz
> 
> and
> --- # ::common
> foo::bar: quux
> 
> then hiera -a will deliever [ 'baz', 'quuux' ], but our notify will give
> us 'baz'. Now, if we change the class:
> 
> class foo (
>   $_bar = hiera_array('foo::bar', $foo::params::bar),

-- 
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: Despite no change in content, agent log file indicates content changed in each catalog run

2013-08-22 Thread Ed Young
Thanks for the response. There doesn't seem to be another process updating 
the files on before the puppet run. I believe the issue was the presence of 
a dynamic tag on the template file. 

The problem appears to be that the tag <%= @uptime_seconds %> was in some 
of the configuration files. When I removed that tag from the apache config 
files, and from the tomcat6 config files, there were no longer any updates 
due to file changes. 

The <%= @uptime_seconds %> appears to be set before execution of the puppet 
run, which I didn't expect, since tags such as <%= @fqdn %> resolve on the 
target agent node. 

Does this sound correct? 
if so, how do I know which tags or variables will be set before the puppet 
execution, and which are set on the agent side after the catalog run? 



On Wednesday, August 21, 2013 7:14:21 AM UTC-6, Rahul Khengare wrote:
>
> Hi Ed,
>Puppet execute their file resource only if contents of target file get 
> changed at the before execution of puppet run.
> I checked your problem on RHEL-6.2 using puppet version 2.7.12, httpd.conf 
> file not transferred each time if there is not change in the contents.   
> You may have to check the contents of httpd.conf file before and running 
> the puppet(use vimdiff command). There may possibility that httpd.conf file 
> is edited by another service, 
>
> Thanks and Regards,
> Rahul Khengare,
> NTT DATA OSS Center, Pune, India.  
>
>
> On Tuesday, August 20, 2013 6:33:03 AM UTC+5:30, Ed Young wrote:
>>
>>
>> Despite no change in file (actually, template) content, with each catalog 
>> run I get such log output as: 
>>
>> Aug 19 20:49:50 app-dev puppet-agent[30132]: 
>> (/Stage[main]/Apache-httpd/File[/etc/httpd/conf/httpd.conf]/content) 
>> content changed '{md5}b8a5c22154e45771bc09ef5c34
>> [root@chimps-dev puppet]# service puppet restart 
>>│603e7f' to 
>> '{md5}14699f9c769a61cbc6cc5e2c2a7465ff'
>>
>> Which indicates that the file changed on the puppet master and so will be 
>> updated on the agent. 
>>
>> This happens consistently and results in a service restart when the files 
>> are config files like httpd.conf. 
>>
>> this is with puppet 2.6.18 on RHEL 6 (puppet master) and RHEL 5 (puppet 
>> agent) 
>>
>> Here is my init.pp in my apache module. Note that I'm using templates 
>> only (nothing in my files directory) 
>>
>> class apache-httpd {
>>
>>   $moduleName = "apache-httpd"
>>
>>   file { '/etc/httpd/conf/httpd.conf':
>>owner => "root",
>>group => "root",
>>mode => 0644,
>>ensure => 'file',
>> #   source => 
>> 'puppet:///modules/apache-httpd/etc/httpd/conf/httpd.conf',
>>content => template('apache-httpd/etc/httpd/conf/httpd.conf.erb'),
>>   }
>>
>> file { '/etc/httpd/conf.d/proxy_ajp.conf':
>>owner => "root",
>>group => "root",
>>mode => 0644,
>>ensure => 'file',
>> #   source => 
>> 'puppet:///modules/apache-httpd/etc/httpd/conf.d/proxy_ajp.conf',
>>content => 
>> template('apache-httpd/etc/httpd/conf.d/proxy_ajp.conf.erb'),
>>   }
>>
>>   file { '/etc/httpd/conf.d/ssl.conf':
>>owner => "root",
>>group => "root",
>>mode => 0644,
>>ensure => 'file',
>> ##   source => 
>> 'puppet:///modules/apache-httpd/etc/httpd/conf.d/ssl.conf',
>>content => template('apache-httpd/etc/httpd/conf.d/ssl.conf.erb'),
>>   }
>>
>> }
>>
>

-- 
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] Confusion with puppetdb (storeconfig) and query database

2013-08-22 Thread Miguel Angel Coa Morales
Yes I can connect but when i list tables i have the next message "No relations 
found." 

1. Connect from my node: [root@node1 ~]# psql -h 10.0.0.132 puppetdb puppetdb
2. Show tables: puppetdb=> \d
No relations found.
3. My databases are:

puppetdb=> \l puppetdb
  List of databases
   Name|  Owner   | Encoding |  Collation  |Ctype|   Access 
privileges
---+--+--+-+-+---
 postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 puppetdb  | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 : 
postgres=CTc/postgres
 template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 : 
postgres=CTc/postgres
(4 rows)


Note: The 10.0.0.132 is my puppetmaster and server puppetdb with postgres .  
¿Is possible that the information is stored elsewhere?

Thanks!!

El 21-08-2013, a las 18:39, Ellison Marks  escribió:

> psql -h 127.0.0.1 puppetdb puppetdb

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+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: Despite no change in content, agent log file indicates content changed in each catalog run

2013-08-22 Thread Stephen Gran

On 22/08/13 16:39, Ed Young wrote:

Thanks for the response. There doesn't seem to be another process
updating the files on before the puppet run. I believe the issue was the
presence of a dynamic tag on the template file.

The problem appears to be that the tag <%= @uptime_seconds %> was in
some of the configuration files. When I removed that tag from the apache
config files, and from the tomcat6 config files, there were no longer
any updates due to file changes.

The <%= @uptime_seconds %> appears to be set before execution of the
puppet run, which I didn't expect, since tags such as <%= @fqdn %>
resolve on the target agent node.

Does this sound correct?
if so, how do I know which tags or variables will be set before the
puppet execution, and which are set on the agent side after the catalog
run?


@uptime_seconds and @fqdn are both facts.  Facts are supplied by the 
agent.  In this case, uptime_seconds is how many seconds the node has 
been up.  This will obviously change between runs.  For a list of what 
facts are available, you can run `facter -p` on the node.


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

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

Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.

Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News & Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

--

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+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: Trouble with ENC and static.pp : enabling ENC fails to find node even with default node in site.pp

2013-08-22 Thread Jason Barlow
Ok, I've got a workaround.  if I return some valid YAML in addition to the 
0 return value, everything works like poptarts:

*null_obj = { 'vars' : { 'emptyvar': '0'}}*
*print yaml.dump(null_obj, Dumper = yaml.SafeDumper)*
*exit(0)*

then the node definitions (including default node definitions) are found in 
site.pp:


*Notice: vacsld01target node definition*
*Notice: 
/Stage[main]//Node[vacsld01target.oss.central1.com]/Notify[vacsld01target 
node definition]/message: defined 'message' as 'vacsld01target node 
definition'*
*Notice: Finished catalog run in 0.24 seconds*



On Wednesday, 21 August 2013 16:04:27 UTC-7, Jason Barlow wrote:
>
> I'm having some trouble with getting an ENC to work alongside site.pp:
>
> Even with a 'default' node definition, and an ENC that only returns 0, 
> regardless of input, consistently results in a 'cannot find node' error. 
>  I'm wondering what I've missed here.
>
> I've tried to reduce everything to a 'base case': and I'm running 3.2.4 on 
> the client and master both:
>
> Here's what I'm trying:
>
> here's my static node definition:
>
> *site.pp:*
> *node default {*
> * notify { "static node definition": }*
> *
> *
> *}*
>
> and my puppet.conf without any node definition:
>
> *puppet.conf*
> *[master]*
> *node_terminus = plain*
>
> works beautifully:
>
> *[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize 
> --verbose --test*
> *Info: Retrieving plugin*
> **
> *Info: Caching catalog for vacsld01target.oss.central1.com*
> *Info: Applying configuration version '1377125492'*
> *Notice: static node definition*
> *Notice: /Stage[main]//Node[default]/Notify[static node 
> definition]/message: defined 'message' as 'static node definition'*
> *Notice: Finished catalog run in 0.05 seconds*
>
>
> If I enable an ENC that only returns 0 regardless of input with the same 
> site.pp configuration:
>
> *puppet.conf*
> [master]
> *node_terminus = exec*
> *external_nodes = /var/lib/puppet/null-nodes.py*
> *reports = store*
> *reportdir = /var/lib/puppet/reports*
>
>
> *[root@vacslp01pmaster manifests]# cat /var/lib/puppet/null-nodes.py*
> *#!/usr/bin/python*
> *import sys*
> *sys.exit(0)*
>
> running the ENC by hand as user puppet:
>
> *[root@vacslp01pmaster manifests]# sudo -u puppet 
> /var/lib/puppet/null-nodes.py ; echo $?*
> *0*
>
>
> *restart puppetmaster*
> *rerun the client*
> *
> *
> *[root@vacsld01target ~]# /usr/bin/puppet agent --onetime --daemonize 
> --test*
> Info: Retrieving plugin
> 
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find node 'vacsld01target.oss.central1.com'; cannot compile
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> [root@vacsld01target ~]# 
>
>

-- 
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] Confusion with puppetdb (storeconfig) and query database

2013-08-22 Thread Ken Barber
Check your /etc/puppetdb/database.ini, it may be configured for
hsqldb. If in doubt provide the file here and we can take a look.

Instructions for configuring this specifically for PostgreSQL are
here: http://docs.puppetlabs.com/puppetdb/1.4/configure.html#using-postgresql

On Thu, Aug 22, 2013 at 7:34 AM, Miguel Angel Coa Morales
 wrote:
> Yes I can connect but when i list tables i have the next message "No
> relations found."
>
> 1. Connect from my node: [root@node1 ~]# psql -h 10.0.0.132 puppetdb
> puppetdb
> 2. Show tables: puppetdb=> \d
> No relations found.
> 3. My databases are:
>
> puppetdb=> \l puppetdb
>   List of databases
>Name|  Owner   | Encoding |  Collation  |Ctype|   Access
> privileges
> ---+--+--+-+-+---
>  postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>  puppetdb  | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>  template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
>  template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
> (4 rows)
>
>
> Note: The 10.0.0.132 is my puppetmaster and server puppetdb with postgres .
> ¿Is possible that the information is stored elsewhere?
>
> Thanks!!
>
> El 21-08-2013, a las 18:39, Ellison Marks  escribió:
>
> psql -h 127.0.0.1 puppetdb puppetdb
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+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.


[Puppet Users] Re: Notify via E-Mail

2013-08-22 Thread Stephen Price
This is something you should be configuring on the Puppet master's local 
MTA, be it Sendmail or Postfix or whatever. Then Puppet will just attempt 
to send email through localhost, and the MTA can determine how to route it 
and with what authentication methods.

On Thursday, August 22, 2013 8:21:21 AM UTC-7, ytmp123 wrote:
>
> Hi guys,
>
> I want the Puppet-Master to notify the admin via E-Mail: SMTP, SSL & 
> Authentification is required. 
> How can I do that with the help of "tagmail"?
>
> Have you some clue for me?
>

-- 
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: Despite no change in content, agent log file indicates content changed in each catalog run

2013-08-22 Thread Ed Young
Regarding that fqdn and uptime_seconds are facts, that is understood. 

The agent node updating the file and triggered the content change may be 
obvious to you, but I'm a puppet beginner, and I yet don't have a solid 
understanding of the catalog run or how, when or where the tags get 
updated. 

1. I thought that the file on the agent node would never be updated unless 
the content on the puppet master changed which would trigger the catalog 
run and force the update. 
2. Instead, it appears that the agent node will trigger an update per it's 
runinterval, resolve the dynamic tags and if a fact needs updating, it will 
update the corresponding file and generate the content changed message I 
saw in the the agent node log. 

Is this close to correct? 

Meanwhile I'm going through ProPuppet and everything I can find on the 
puppetlabs site and hope to have a better understanding. 



On Thursday, August 22, 2013 10:00:38 AM UTC-6, Stephen Gran wrote:
>
> On 22/08/13 16:39, Ed Young wrote: 
> > Thanks for the response. There doesn't seem to be another process 
> > updating the files on before the puppet run. I believe the issue was the 
> > presence of a dynamic tag on the template file. 
> > 
> > The problem appears to be that the tag <%= @uptime_seconds %> was in 
> > some of the configuration files. When I removed that tag from the apache 
> > config files, and from the tomcat6 config files, there were no longer 
> > any updates due to file changes. 
> > 
> > The <%= @uptime_seconds %> appears to be set before execution of the 
> > puppet run, which I didn't expect, since tags such as <%= @fqdn %> 
> > resolve on the target agent node. 
> > 
> > Does this sound correct? 
> > if so, how do I know which tags or variables will be set before the 
> > puppet execution, and which are set on the agent side after the catalog 
> > run? 
>
> @uptime_seconds and @fqdn are both facts.  Facts are supplied by the 
> agent.  In this case, uptime_seconds is how many seconds the node has 
> been up.  This will obviously change between runs.  For a list of what 
> facts are available, you can run `facter -p` on the node. 
>
> Cheers, 
> -- 
> Stephen Gran 
> Senior Systems Integrator - theguardian.com 
> Please consider the environment before printing this email. 
> -- 
> Visit theguardian.com   
>
> On your mobile, download the Guardian iPhone app theguardian.com/iphoneand 
> our iPad edition 
> theguardian.com/iPad   
> Save up to 32% by subscribing to the Guardian and Observer - choose the 
> papers you want and get full digital access. 
> Visit subscribe.theguardian.com 
>
> This e-mail and all attachments are confidential and may also 
> be privileged. If you are not the named recipient, please notify 
> the sender and delete the e-mail and all attachments immediately. 
> Do not disclose the contents to another person. You may not use 
> the information for any purpose, or store, or copy, it in any way. 
>   
> Guardian News & Media Limited is not liable for any computer 
> viruses or other material transmitted with or as part of this 
> e-mail. You should employ virus checking software. 
>   
> Guardian News & Media Limited 
>   
> A member of Guardian Media Group plc 
> Registered Office 
> PO Box 68164 
> Kings Place 
> 90 York Way 
> London 
> N1P 2AP 
>   
> Registered in England Number 908396 
>
> -- 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+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] Confusion with puppetdb (storeconfig) and query database

2013-08-22 Thread Miguel Angel Coa Morales
My setting for db I've the next:

[…..]
[root@master puppet]# cat /etc/puppetdb/conf.d/config.ini | grep -v ^#

[global]
vardir = /var/lib/puppetdb
logging-config = /etc/puppetdb/log4j.properties

resource-query-limit = 2
[command-processing]

[database]
classname = org.postgresql.Driver
subprotocol = postgresql
subname = //localhost:5432/puppetdb
username = puppetdb
password = puppetdb

[jetty]
port = 8080
[…..]

My routes.yaml

[…..]
/etc/puppet/routes.yaml

master:
  facts:
  terminus: puppetdb
  cache: yaml
[…..]

My  /etc/puppet/puppetdb.conf

[…..]
[main]

server = master.example.com
port = 8081
[…..]

Thanks. 

El 22-08-2013, a las 12:47, Ken Barber  escribió:

> Check your /etc/puppetdb/database.ini, it may be configured for
> hsqldb. If in doubt provide the file here and we can take a look.
> 
> Instructions for configuring this specifically for PostgreSQL are
> here: http://docs.puppetlabs.com/puppetdb/1.4/configure.html#using-postgresql
> 
> On Thu, Aug 22, 2013 at 7:34 AM, Miguel Angel Coa Morales
>  wrote:
>> Yes I can connect but when i list tables i have the next message "No
>> relations found."
>> 
>> 1. Connect from my node: [root@node1 ~]# psql -h 10.0.0.132 puppetdb
>> puppetdb
>> 2. Show tables: puppetdb=> \d
>> No relations found.
>> 3. My databases are:
>> 
>> puppetdb=> \l puppetdb
>>  List of databases
>>   Name|  Owner   | Encoding |  Collation  |Ctype|   Access
>> privileges
>> ---+--+--+-+-+---
>> postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>> puppetdb  | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>> :
>> postgres=CTc/postgres
>> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>> :
>> postgres=CTc/postgres
>> (4 rows)
>> 
>> 
>> Note: The 10.0.0.132 is my puppetmaster and server puppetdb with postgres .
>> ¿Is possible that the information is stored elsewhere?
>> 
>> Thanks!!
>> 
>> El 21-08-2013, a las 18:39, Ellison Marks  escribió:
>> 
>> psql -h 127.0.0.1 puppetdb puppetdb
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+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 a topic in the Google 
> Groups "Puppet Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/puppet-users/ELg35FS1fZg/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.


[Puppet Users] Re: Notify via E-Mail

2013-08-22 Thread ytmp123
Ah ok,

So I've to install and configure an SMTP-Server on the local-machine, on 
which the puppetmaster is installed. This local SMTP-Server then has to 
connect to the real SMTP-Server out there in the Internet. Is that right?

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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: Notify via E-Mail

2013-08-22 Thread Stephen Price
Correct! That way the Master doesn't have to know the specifics, it just
queues the mail locally.


On Thu, Aug 22, 2013 at 10:51 AM, ytmp123  wrote:

> Ah ok,
>
> So I've to install and configure an SMTP-Server on the local-machine, on
> which the puppetmaster is installed. This local SMTP-Server then has to
> connect to the real SMTP-Server out there in the Internet. Is that right?
>
> thanks
>
> --
> 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/FfL0ft-PMN0/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.
>



-- 
Stephen Price

-- 
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] Confusion with puppetdb (storeconfig) and query database

2013-08-22 Thread Ken Barber
Do you see any active connections? A query like this in pgsql might
give you some information:

SELECT datname,procpid,current_query FROM pg_stat_activity;

On Thu, Aug 22, 2013 at 9:54 AM, Miguel Angel Coa Morales
 wrote:
> My setting for db I've the next:
>
> […..]
> [root@master puppet]# cat /etc/puppetdb/conf.d/config.ini | grep -v ^#
>
> [global]
> vardir = /var/lib/puppetdb
> logging-config = /etc/puppetdb/log4j.properties
>
> resource-query-limit = 2
> [command-processing]
>
> [database]
> classname = org.postgresql.Driver
> subprotocol = postgresql
> subname = //localhost:5432/puppetdb
> username = puppetdb
> password = puppetdb
>
> [jetty]
> port = 8080
> […..]
>
> My routes.yaml
>
> […..]
> /etc/puppet/routes.yaml
>
> master:
>   facts:
>   terminus: puppetdb
>   cache: yaml
> […..]
>
> My  /etc/puppet/puppetdb.conf
>
> […..]
> [main]
>
> server = master.example.com
> port = 8081
> […..]
>
> Thanks.
>
> El 22-08-2013, a las 12:47, Ken Barber  escribió:
>
>> Check your /etc/puppetdb/database.ini, it may be configured for
>> hsqldb. If in doubt provide the file here and we can take a look.
>>
>> Instructions for configuring this specifically for PostgreSQL are
>> here: http://docs.puppetlabs.com/puppetdb/1.4/configure.html#using-postgresql
>>
>> On Thu, Aug 22, 2013 at 7:34 AM, Miguel Angel Coa Morales
>>  wrote:
>>> Yes I can connect but when i list tables i have the next message "No
>>> relations found."
>>>
>>> 1. Connect from my node: [root@node1 ~]# psql -h 10.0.0.132 puppetdb
>>> puppetdb
>>> 2. Show tables: puppetdb=> \d
>>> No relations found.
>>> 3. My databases are:
>>>
>>> puppetdb=> \l puppetdb
>>>  List of databases
>>>   Name|  Owner   | Encoding |  Collation  |Ctype|   Access
>>> privileges
>>> ---+--+--+-+-+---
>>> postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>>> puppetdb  | puppetdb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>>> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>>> :
>>> postgres=CTc/postgres
>>> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>>> :
>>> postgres=CTc/postgres
>>> (4 rows)
>>>
>>>
>>> Note: The 10.0.0.132 is my puppetmaster and server puppetdb with postgres .
>>> ¿Is possible that the information is stored elsewhere?
>>>
>>> Thanks!!
>>>
>>> El 21-08-2013, a las 18:39, Ellison Marks  escribió:
>>>
>>> psql -h 127.0.0.1 puppetdb puppetdb
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to puppet-users+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 a topic in the 
>> Google Groups "Puppet Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/puppet-users/ELg35FS1fZg/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.

-- 
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: Notify via E-Mail

2013-08-22 Thread ytmp123
Ok. Thanks a lot!

-- 
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: Pass same parameter value to multiple classes using Puppet Hiera

2013-08-22 Thread RobH
Thanks. These are good pointers.

-- 
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] Using file and mount more efficiently

2013-08-22 Thread maillists0
... and $name is the default variable given to you by puppet, so you don't
have to define it.  Works like $_ in perl.


On Wed, Aug 21, 2013 at 7:18 PM, Peter Bukowinski  wrote:

> You define an array-containing variable like this:
>
> $mounts = [ 'directory1', 'directory2', 'directory3' ]
>
> You can also put newlines after the commas for easier reading. The
> following code should be functional:
>
> class test_case {
> $mounts = [
> 'directory1',
> 'directory2',
> 'directory3',
> ]
> define my_mounts {
> file { "/home/${name}":
> ensure => directory,
> owner => "$name",
> mode => "0755",
> }
> mount { "/home/${name}":
> device   => "our-thumper.domain.com:/export/${name}",
>
> atboot   => yes,
> fstype   => "nfs",
> options  => "tcp,hard,intr,rw,bg",
> name => "/home/${name}",
>
> ensure   => mounted,
> remounts => true,
> pass => "0",
> require => File["/home/${name}"],
> }
> }
> my_mounts { $mounts: }
> }
>
> Of course, instead of defining the $mounts variable in the manifest
> itself, you can get that array via a custom fact or from hiera.
>
> --
> Peter
>
> On Aug 21, 2013, at 2:55 PM, Forrie  wrote:
>
> So I would need to define $mounts, presumably as:
>
> $mounts = "directory1 directory2 directory3"
>
> ?
>
> Where is $name being defined here.
>
>
> --
> 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.
>

-- 
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] hiera and defaults

2013-08-22 Thread Igor Galić


- Original Message -
> Hi,
> 
> is this puppet 3? I shall suppose it is.
> 
> With the parameter name of "bar", you likely trigger the automagic hiera
> lookup of foo::bar, which is (naturally) not done using hiera_array.
> Apparently, this overrides the explicit call to hiera_array.
> 
> I'm not sure wether that's as designed, you may want to open a bug if in
> doubt.

It is indeed puppet 3.$latest, and I shall indeed consider it a bug,
unless it's explicitly documented to be a feature.

--i

> Cheers,
> Felix
> 
> On 08/22/2013 03:01 PM, Igor Galić wrote:
> > with the values:
> > 
> > --- # ::fqdn
> > foo::bar: baz
> > 
> > and
> > --- # ::common
> > foo::bar: quux
> > 
> > then hiera -a will deliever [ 'baz', 'quuux' ], but our notify will give
> > us 'baz'. Now, if we change the class:
> > 
> > class foo (
> >   $_bar = hiera_array('foo::bar', $foo::params::bar),
> 
> --
> 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.
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

-- 
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: Despite no change in content, agent log file indicates content changed in each catalog run

2013-08-22 Thread Rahul Khengare
Ed, It sound correct. The tag/facter value @uptime_seconds changes each
time you run the puppet on agent machine.
During the puppet catalog run, puppet first fetch the facter value and then
apply the puppet manifests. So whatever the value of facter are set before
the puppet manifests deployment.
You can view facter values using 'facter -p'.

You may look for tag concept it might help.
http://projects.puppetlabs.com/projects/1/wiki/Using_Tags

Thanks and Regards,
Rahul Khengare,
NTT DATA OSS Center, Pune, India.




On Thu, Aug 22, 2013 at 9:09 PM, Ed Young  wrote:

> Thanks for the response. There doesn't seem to be another process updating
> the files on before the puppet run. I believe the issue was the presence of
> a dynamic tag on the template file.
>
> The problem appears to be that the tag <%= @uptime_seconds %> was in some
> of the configuration files. When I removed that tag from the apache config
> files, and from the tomcat6 config files, there were no longer any updates
> due to file changes.
>
> The <%= @uptime_seconds %> appears to be set before execution of the
> puppet run, which I didn't expect, since tags such as <%= @fqdn %> resolve
> on the target agent node.
>
> Does this sound correct?
> if so, how do I know which tags or variables will be set before the puppet
> execution, and which are set on the agent side after the catalog run?
>
>
>
>
> On Wednesday, August 21, 2013 7:14:21 AM UTC-6, Rahul Khengare wrote:
>>
>> Hi Ed,
>>Puppet execute their file resource only if contents of target file get
>> changed at the before execution of puppet run.
>> I checked your problem on RHEL-6.2 using puppet version 2.7.12,
>> httpd.conf file not transferred each time if there is not change in the
>> contents.
>> You may have to check the contents of httpd.conf file before and running
>> the puppet(use vimdiff command). There may possibility that httpd.conf file
>> is edited by another service,
>>
>> Thanks and Regards,
>> Rahul Khengare,
>> NTT DATA OSS Center, Pune, India.
>>
>>
>> On Tuesday, August 20, 2013 6:33:03 AM UTC+5:30, Ed Young wrote:
>>>
>>>
>>> Despite no change in file (actually, template) content, with each
>>> catalog run I get such log output as:
>>>
>>> Aug 19 20:49:50 app-dev puppet-agent[30132]: (/Stage[main]/Apache-httpd/
>>> **File[/etc/httpd/conf/httpd.**conf]/content) content changed '{md5}**
>>> b8a5c22154e45771bc09ef5c34
>>> [root@chimps-dev puppet]# service puppet restart
>>>  │603e7f' to '{md5}**
>>> 14699f9c769a61cbc6cc5e2c2a7465**ff'
>>>
>>> Which indicates that the file changed on the puppet master and so will
>>> be updated on the agent.
>>>
>>> This happens consistently and results in a service restart when the
>>> files are config files like httpd.conf.
>>>
>>> this is with puppet 2.6.18 on RHEL 6 (puppet master) and RHEL 5 (puppet
>>> agent)
>>>
>>> Here is my init.pp in my apache module. Note that I'm using templates
>>> only (nothing in my files directory)
>>>
>>> class apache-httpd {
>>>
>>>   $moduleName = "apache-httpd"
>>>
>>>   file { '/etc/httpd/conf/httpd.conf':
>>>owner => "root",
>>>group => "root",
>>>mode => 0644,
>>>ensure => 'file',
>>> #   source => 'puppet:///modules/apache-**
>>> httpd/etc/httpd/conf/httpd.**conf',
>>>content => template('apache-httpd/etc/**
>>> httpd/conf/httpd.conf.erb'),
>>>   }
>>>
>>> file { '/etc/httpd/conf.d/proxy_ajp.**conf':
>>>owner => "root",
>>>group => "root",
>>>mode => 0644,
>>>ensure => 'file',
>>> #   source => 'puppet:///modules/apache-**
>>> httpd/etc/httpd/conf.d/proxy_**ajp.conf',
>>>content => template('apache-httpd/etc/**
>>> httpd/conf.d/proxy_ajp.conf.**erb'),
>>>   }
>>>
>>>   file { '/etc/httpd/conf.d/ssl.conf':
>>>owner => "root",
>>>group => "root",
>>>mode => 0644,
>>>ensure => 'file',
>>> ##   source => 'puppet:///modules/apache-**
>>> httpd/etc/httpd/conf.d/ssl.**conf',
>>>content => template('apache-httpd/etc/**
>>> httpd/conf.d/ssl.conf.erb'),
>>>   }
>>>
>>> }
>>>
>>  --
> 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/Gly9jw9K3m8/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://gro