Re: [Puppet Users] how to puppet and diff without fqdn

2014-07-15 Thread elvis
thx, the certname works for me,  i have now replace the certname when the 
system starts 
thank you ~

在 2014年7月10日星期四UTC+8下午9时44分16秒,Christopher Wood写道:
>
> I confess I might not understand the question as phrased. It seems like 
> you want to declare nodes by uuid not hostname. If so, you might want to 
> set their certname to that uuid: 
>
> http://docs.puppetlabs.com/references/latest/configuration.html#certname 
>
> As part of the provisioning step you'd probably put the uuid in an 
> external fact and build a stub puppet.conf. Later in the agent run you 
> might use this custom fact to build a more complete puppet.conf for your 
> agent. 
>
> http://docs.puppetlabs.com/guides/custom_facts.html#external-facts 
>
> On Thu, Jul 10, 2014 at 01:34:39AM -0700, el...@lnmpy.com  
> wrote: 
> >I have one problem, that how to manage the agent-nodes with puppet? 
> >I'm using the openstack to auto generating the vms, and then puppet 
> with 
> >several puppet-code in special pattern. 
> >eg. 
> >The system provision several vms, each vm has two attrs: 
> >   `fqdn`: maybe repeat(you know the vms are genrate by system in a 
> >complex env) 
> >   `uuid`: this will be unique, and is stored in a persistent file. 
> it 
> >won't change 
> >and below are two of them. 
> >VM1:  
> >fqdn: api-server.expamle.com 
> >uuid: 20a558f1-2cd9-4068-b5fc-8d252c3f3262 
> >VM2:  
> >fqdn: api-server.expamle.com 
> >uuid: 096359d6-5dc9-47e9-946a-bd702fe7c2d5 
> >(Also, I can specify the hostname with the `uuid`, but I think it's 
> not a 
> >good idea.) 
> >and now I want to puppet them with `puppet kick` or `mcollective 
> puppet 
> >runonce`. 
> >with `mco`, i can choose the facter uuid, that will diff VM1&VM2. 
> >`mco pupppetd runonce --with-facter 
> >uuid=20a558f1-2cd9-4068-b5fc-8d252c3f3262` 
> >but I STILL MUST hardcode the fqdn in the puppet-code 
> >` 
> >node api-server.expamle.com { 
> >... 
> >} 
> >` 
> >but in fact, I just want use it in the following style: 
> >` 
> >facter 20a558f1-2cd9-4068-b5fc-8d252c3f3262 { 
> >... 
> >} 
> >facter 096359d6-5dc9-47e9-946a-bd702fe7c2d5 { 
> >... 
> >} 
> >` 
> >how can I write the puppet? or do some change in the architecture? 
> > 
> >-- 
> >You received this message because you are subscribed to the Google 
> Groups 
> >"Puppet Users" group. 
> >To unsubscribe from this group and stop receiving emails from it, 
> send an 
> >email to [1]puppet-users...@googlegroups.com . 
> >To view this discussion on the web visit 
> >[2]
> https://groups.google.com/d/msgid/puppet-users/e9abec5b-ea35-4eff-b6c5-bf1b27236e96%40googlegroups.com.
>  
>
> >For more options, visit [3]https://groups.google.com/d/optout. 
> > 
> > References 
> > 
> >Visible links 
> >1. mailto:puppet-users+unsubscr...@googlegroups.com  
> >2. 
> https://groups.google.com/d/msgid/puppet-users/e9abec5b-ea35-4eff-b6c5-bf1b27236e96%40googlegroups.com?utm_medium=email&utm_source=footer
>  
> >3. https://groups.google.com/d/optout 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c554db64-86c8-42a3-9d26-4ba8c01be837%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: How can I use mcollective with fqdns?

2014-07-15 Thread elvis
I found the desc in the docs,
http://docs.puppetlabs.com/mcollective/reference/basic/basic_cli_usage.html

# just the machines called dev1 or dev2 % mco ping -I dev1 -I dev2

It shows that I can connect two different nodes, but it does not work on my 
mcollective


root@puppet-master:~# mco ping -I 728a6343-62ba-4d15-8a48-8d4257fe59f8 
728a6343-62ba-4d15-8a48-8d4257fe59f8 time=43.68 ms


root@puppet-master:~# mco ping -I 5effb293-fe15-4923-b360-4694e05a7afc
5effb293-fe15-4923-b360-4694e05a7afc time=41.86 ms

root@puppet-master:~# mco ping -I 5effb293-fe15-4923-b360-4694e05a7afc -I 
728a6343-62ba-4d15-8a48-8d4257fe59f8






在 2014年7月16日星期三UTC+8下午2时11分59秒,el...@lnmpy.com写道:
>
> when using *puppet kick*, i can specify more than one fqdns behind,
> just like:
> puppet kick client1.datayes.com client2.datayes.com
>
>
> but when I want to use *mco puppetd runonce *
> I can only use like
> mco puppetd runonce -I client1.datayes.com
>
> else if I use
>
> mco puppetd runonce -I client1.datayes.com -I client2.datayes.com
> it will not find the correct machines
>
> how can I use mco?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7cdad599-103d-4604-8e70-fe1fd56fe069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Facter on Amazon AMI with ruby2

2014-07-15 Thread Peter Romfeld
Hi,

I have problems to get facter running:

OS:
Amazon Linux AMI release 2014.03
Ruby:
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]

I tried the amz provided facter package and also facter2.1 from
puppetlabs repo, with both I have the same problem:
/usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in 
`require':
cannot load such file -- facter/application (LoadError)
from
/usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in 
`require'
from /usr/bin/facter:18:in `'

On other machines I can just reinstall ruby and use 1.8, but on one
machine I have something else running that requires ruby2

Cheers,
Peter

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


[Puppet Users] How can I use mcollective with fqdns?

2014-07-15 Thread elvis
when using *puppet kick*, i can specify more than one fqdns behind,
just like:
puppet kick client1.datayes.com client2.datayes.com


but when I want to use *mco puppetd runonce *
I can only use like
mco puppetd runonce -I client1.datayes.com

else if I use

mco puppetd runonce -I client1.datayes.com -I client2.datayes.com
it will not find the correct machines

how can I use mco?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0323dcba-a74e-4aa5-9131-00d26249bed5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: certificate not found on agent machine

2014-07-15 Thread elvis
http://bitcube.co.uk/content/puppet-errors-explained
you can find your error in the page yourself

在 2014年7月16日星期三UTC+8下午12时53分09秒,Nishantu Kumar写道:
>
> Hello All,
>
> I am getting error on agent machine for digital certificate not found, 
> when i run the command "sudo puppet agent -t" and getting error
> Exiting; no certificate found and waitforcert is disabled.
>
> I can run the command manually for digital certificate but is there any 
> way to generate the certificate on agent machine automatically without 
> running any manual commands.
>
> Thanks,
> Nishantu
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8fc8738a-7297-4d7f-9e41-5380be382297%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] certificate not found on agent machine

2014-07-15 Thread Nishantu Kumar
Hello All,

I am getting error on agent machine for digital certificate not found, when 
i run the command "sudo puppet agent -t" and getting error
Exiting; no certificate found and waitforcert is disabled.

I can run the command manually for digital certificate but is there any way 
to generate the certificate on agent machine automatically without running 
any manual commands.

Thanks,
Nishantu


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0398aaa6-a9f3-4dab-96b4-f31ccdff2851%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet copy not working

2014-07-15 Thread Nishantu Kumar
Thanks for your support

On Friday, July 11, 2014 3:21:38 PM UTC+5:30, Nishantu Kumar wrote:
>
> Hello All,
>
> I have successfully configured puppet master and agent on two machines and 
> i have created a file in manifest directory to copy a file from master 
> server to agent machine but its not copying and throwing some error,  can 
> anyone tell me and share with me the procedure to copy file from master 
> server to client machine.
>
> Thanks in advance
> Nishantu
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/49be438f-876d-4fa9-bf27-55e1f6c356db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet catalog transfer often gets truncated (Could not intern from pson: error)

2014-07-15 Thread Henrik Lindberg

On 2014-15-07 23:12, Felix Frank wrote:

On 07/15/2014 01:47 PM, Daniel wrote:

I am also getting this problem. Did running the puppet master
within Apache/Passenger or nginx/Passenger help at all?

I was thinking it could be to do with a non ascii character making its
way into my code somewhere as that seems to cause dodgy stuff but
that's not it. I've seen lots of suggestions but I get the feeling it
must be a bug with puppet.

Not able to view the ticket as it looks like projects.puppetlabs.com
is down currently.

I am using opensource:

ruby-1.8.7.352-13.el6.x86_64
puppet-2.7.25-2.el6.noarch
puppet-server-2.7.25-2.el6.noarch

Dan


Wow, that issue is *old* :-) Hasn't been migrated to Jira, either.

According to Redmine, moving to Passenger has helped at least one user,
apparently.

HTH,
Felix

This is probably the Webrick threading issues that were fixed for 3.6.2 
- IIRC that could cause truncated catalogs.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/lq4f2c%24p9u%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dealing with Packages on Windows that contain special characters

2014-07-15 Thread Ken Sykora
3.6.2 is the version I'm using. Here's the full output:

C:\Users\vagrant>puppet apply --modulepath 
'/vagrant/modules;/ProgramData/PuppetLabs/puppet/etc/modules' 
--hiera_config=/vagrant/hiera.yaml --detailed-exitcodes 
/vagrant/manifests/site.pp --debug --trace --verbose > puppet-run.log

puppet-run.log: https://gist.github.com/kensykora/d2431b2351b138066a66

On Tuesday, July 15, 2014 4:29:42 PM UTC-5, Rob Reynolds wrote:
>
> One thing I forgot to ask, what version of Puppet are you using on the box 
> in question?
>
> And what is the output with puppet apply *manifest.pp* --debug --trace 
> --verbose 
>
>
> On Tue, Jul 15, 2014 at 4:21 PM, Ken Sykora  > wrote:
>
>> Done -- thanks!
>>
>> https://tickets.puppetlabs.com/browse/PUP-2937
>>
>>
>> On Tuesday, July 15, 2014 2:19:31 PM UTC-5, Rob Reynolds wrote:
>>
>>> I think we can call this a valid issue. Would you mind filing a ticket 
>>> over on https://tickets.puppetlabs.com/browse/PUP? Thanks!
>>>  
>>>
>>> On Fri, Jul 11, 2014 at 3:24 PM, Ken Sykora  wrote:
>>>
  Also I'm noticing that on successful runs with the UTF-8 character I 
 get this error:

 Error: Failed to apply catalog: incompatible character encodings: UTF-8 
 and IBM437


 On Friday, July 11, 2014 2:57:13 PM UTC-5, Ken Sykora wrote:
>
> Sorry for the late reply, Rob.
>
> Putting the endash as a unicode character in my manifest causes it to 
> miss the package being already installed.
>
>   file { "${tempDirectory}WindowsAzureLibsForNet-x64.msi":
> ensure => present,
> source => 'puppet:///modules/packages/WindowsAzureLibsForNet-x64.
> msi',
>   }
>   ->
>   package { 'Azure Libraries for .NET – v2.3':
> ensure  => '2.3.0424.070',
> source  => "${tempDirectory}WindowsAzureLibsForNet-x64.msi"
>   }
>
> When I run my manifest I get this:
>
>   Notice: /Stage[main]/Packages::Msi/Package[Azure Libraries for .NET 
> ΓÇô v2.3]/ensure: created
>
> On Monday, June 30, 2014 2:04:45 PM UTC-5, Rob Reynolds wrote:
>>
>>
>>
>> On Thu, Jun 26, 2014 at 9:33 AM, Ken Sykora  
>> wrote:
>>
>>> I'm currently trying to prevent a specific package from continuing 
>>> its install run on subsequent puppet apply commands. The package in 
>>> Question is the Windows Azure SDK for .Net 2.3. The package's name 
>>> listed 
>>> in the registry contains an endash (–) instead a normal hyphen.
>>>
>>>
>>> 
>>> In puppet, it shows up like this:
>>>
>>> PS C:\Users\vagrant> puppet resource package | sls Azure
 package { 'Windows Azure Authoring Tools - v2.3':
 package { 'Windows Azure Command Line Tools':
 package { 'Windows Azure Compute Emulator - v2.3':
 *package { 'Windows Azure Libraries for .NET û v2.3':*
 package { 'Windows Azure Pack - PowerShell API - 2013':
 package { 'Windows Azure PowerShell - May 2014':
 package { 'Windows Azure Storage Tools - v2.2.2':
 package { 'Windows Azure Tools for Microsoft Visual Studio 2013 - 
 v2.3':
>>>
>>>
>>> However, querying for it specifically seems difficult -- this is 
>>> what I can't figure out:
>>>
>>> PS C:\Users\vagrant> puppet resource package "Windows Azure 
 Libraries for .NET – v2.3"
 package { 'Windows Azure Libraries for .NET û v2.3':
   ensure => 'absent',
 }
 PS C:\Users\vagrant> puppet resource package "Windows Azure 
 Libraries for .NET û v2.3"
 package { 'Windows Azure Libraries for .NET √ v2.3':
   ensure => 'absent',
 }
>>>
>>>
>>> How can I reference this package by it's correct name so the 
>>> installer doesn't run multiple times on provisioning?
>>>
>>
>> What does putting the endash in the manifest do for your run?  
>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to puppet-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/277a5958-3920
>>> -4c53-826e-0db76315ab7a%40googlegroups.com 
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Rob Reynolds
>> Developer, Puppet Labs
>>
>> *Join us at PuppetConf 2014 , September 
>> 20-24 in San Francisco*
>> *Register by July 31st to take advantage of the Earl

Re: [Puppet Users] puppet-postgres error

2014-07-15 Thread Hunter Haugen
The validate_db_connection would come from
https://github.com/puppetlabs/puppetlabs-postgresql#resource-postgresqlvalidate_db_connection
which is declared by the postgresql::server -> postgresql::server::service
class
https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/server/service.pp#L29
. The exec is
https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/validate_db_connection.pp#L51

So it appears that the service tries to start but isn't accepting
connections via the psql command? There isn't enough information in the
pasted errors to tell why though. One thing that is weird is the "-h  -U
 -p  " arguments with double spaces, indicating that a
hostname/user/password is blan, so that might be why (even though this code
is supposed to guard against it
https://github.com/puppetlabs/puppetlabs-postgresql/blob/master/manifests/validate_db_connection.pp#L23-L34
).

What version of puppetlabs-postgresql is this?





-Hunter


On Tue, Jul 15, 2014 at 1:41 PM, Felix Frank <
felix.fr...@alumni.tu-berlin.de> wrote:

>  Hi,
>
> it would be helpful to see the manifest that declares the Exec[validate
> postgres connection for /postgres].
>
> For debugging, the easiest approach is pasting the failing commands to a
> shell.
>
> Regards,
> Felix
>
>
> On 07/14/2014 08:35 AM, Rajesh Taneja wrote:
>
> While running puppet agent, I am getting following error. Can someone help
> me understand what might be wrong.
>
>  Warning: Exec[validate postgres connection for
> /postgres](provider=posix): Cannot understand environment setting
> "PGPASSWORD="
> Warning: Exec[validate postgres connection for /postgres](provider=posix):
> Cannot understand environment setting "PGPASSWORD="
> Notice:
> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
> postgres connection for /postgres]/returns: Unable to connect to defined
> database using: /usr/bin/psql --tuples-only --quiet -h  -U  -p  --dbname
> postgres
> Error: echo 'Unable to connect to defined database using: /usr/bin/psql
> --tuples-only --quiet -h  -U  -p  --dbname postgres ' && false returned 1
> instead of one of [0]
> Error:
> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
> postgres connection for /postgres]/returns: change from notrun to 0 failed:
> echo 'Unable to connect to defined database using: /usr/bin/psql
> --tuples-only --quiet -h  -U  -p  --dbname postgres ' && false returned 1
> instead of one of [0]
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d4866842-9ae8-4ade-89c9-34aa9e82e074%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/53C591E8.5060003%40Alumni.TU-Berlin.de
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJaQvGAU%3DE5Wr-iJ33VowKD5tvi37XwEZxn%3DYnfGDNCq16vV9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Dealing with Packages on Windows that contain special characters

2014-07-15 Thread Rob Reynolds
One thing I forgot to ask, what version of Puppet are you using on the box
in question?

And what is the output with puppet apply *manifest.pp* --debug --trace
--verbose


On Tue, Jul 15, 2014 at 4:21 PM, Ken Sykora  wrote:

> Done -- thanks!
>
> https://tickets.puppetlabs.com/browse/PUP-2937
>
>
> On Tuesday, July 15, 2014 2:19:31 PM UTC-5, Rob Reynolds wrote:
>
>> I think we can call this a valid issue. Would you mind filing a ticket
>> over on https://tickets.puppetlabs.com/browse/PUP? Thanks!
>>
>>
>> On Fri, Jul 11, 2014 at 3:24 PM, Ken Sykora  wrote:
>>
>>> Also I'm noticing that on successful runs with the UTF-8 character I get
>>> this error:
>>>
>>> Error: Failed to apply catalog: incompatible character encodings: UTF-8
>>> and IBM437
>>>
>>>
>>> On Friday, July 11, 2014 2:57:13 PM UTC-5, Ken Sykora wrote:

 Sorry for the late reply, Rob.

 Putting the endash as a unicode character in my manifest causes it to
 miss the package being already installed.

   file { "${tempDirectory}WindowsAzureLibsForNet-x64.msi":
 ensure => present,
 source => 'puppet:///modules/packages/WindowsAzureLibsForNet-x64.
 msi',
   }
   ->
   package { 'Azure Libraries for .NET – v2.3':
 ensure  => '2.3.0424.070',
 source  => "${tempDirectory}WindowsAzureLibsForNet-x64.msi"
   }

 When I run my manifest I get this:

   Notice: /Stage[main]/Packages::Msi/Package[Azure Libraries for .NET
 ΓÇô v2.3]/ensure: created

 On Monday, June 30, 2014 2:04:45 PM UTC-5, Rob Reynolds wrote:
>
>
>
> On Thu, Jun 26, 2014 at 9:33 AM, Ken Sykora 
> wrote:
>
>> I'm currently trying to prevent a specific package from continuing
>> its install run on subsequent puppet apply commands. The package in
>> Question is the Windows Azure SDK for .Net 2.3. The package's name listed
>> in the registry contains an endash (–) instead a normal hyphen.
>>
>>
>> 
>> In puppet, it shows up like this:
>>
>> PS C:\Users\vagrant> puppet resource package | sls Azure
>>> package { 'Windows Azure Authoring Tools - v2.3':
>>> package { 'Windows Azure Command Line Tools':
>>> package { 'Windows Azure Compute Emulator - v2.3':
>>> *package { 'Windows Azure Libraries for .NET û v2.3':*
>>> package { 'Windows Azure Pack - PowerShell API - 2013':
>>> package { 'Windows Azure PowerShell - May 2014':
>>> package { 'Windows Azure Storage Tools - v2.2.2':
>>> package { 'Windows Azure Tools for Microsoft Visual Studio 2013 -
>>> v2.3':
>>
>>
>> However, querying for it specifically seems difficult -- this is what
>> I can't figure out:
>>
>> PS C:\Users\vagrant> puppet resource package "Windows Azure Libraries
>>> for .NET – v2.3"
>>> package { 'Windows Azure Libraries for .NET û v2.3':
>>>   ensure => 'absent',
>>> }
>>> PS C:\Users\vagrant> puppet resource package "Windows Azure
>>> Libraries for .NET û v2.3"
>>> package { 'Windows Azure Libraries for .NET √ v2.3':
>>>   ensure => 'absent',
>>> }
>>
>>
>> How can I reference this package by it's correct name so the
>> installer doesn't run multiple times on provisioning?
>>
>
> What does putting the endash in the manifest do for your run?
>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to puppet-users...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/puppet-users/277a5958-3920-4c53-826e-0db76315ab7a%40goog
>> legroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2014 , September
> 20-24 in San Francisco*
> *Register by July 31st to take advantage of the Early Bird discount
>  **—**save
> $249!*
>
  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to puppet-users...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/puppet-users/ab661fc5-0200-4d69-adfa-4eb04a0c08ea%
>>> 40googlegroups.com
>>> 

Re: [Puppet Users] Dealing with Packages on Windows that contain special characters

2014-07-15 Thread Ken Sykora
Done -- thanks!

https://tickets.puppetlabs.com/browse/PUP-2937

On Tuesday, July 15, 2014 2:19:31 PM UTC-5, Rob Reynolds wrote:
>
> I think we can call this a valid issue. Would you mind filing a ticket 
> over on https://tickets.puppetlabs.com/browse/PUP? Thanks!
>
>
> On Fri, Jul 11, 2014 at 3:24 PM, Ken Sykora  > wrote:
>
>> Also I'm noticing that on successful runs with the UTF-8 character I get 
>> this error:
>>
>> Error: Failed to apply catalog: incompatible character encodings: UTF-8 
>> and IBM437
>>
>>
>> On Friday, July 11, 2014 2:57:13 PM UTC-5, Ken Sykora wrote:
>>>
>>> Sorry for the late reply, Rob.
>>>
>>> Putting the endash as a unicode character in my manifest causes it to 
>>> miss the package being already installed.
>>>
>>>   file { "${tempDirectory}WindowsAzureLibsForNet-x64.msi":
>>> ensure => present,
>>> source => 'puppet:///modules/packages/WindowsAzureLibsForNet-x64.
>>> msi',
>>>   }
>>>   ->
>>>   package { 'Azure Libraries for .NET – v2.3':
>>> ensure  => '2.3.0424.070',
>>> source  => "${tempDirectory}WindowsAzureLibsForNet-x64.msi"
>>>   }
>>>
>>> When I run my manifest I get this:
>>>
>>>   Notice: /Stage[main]/Packages::Msi/Package[Azure Libraries for .NET 
>>> ΓÇô v2.3]/ensure: created
>>>
>>> On Monday, June 30, 2014 2:04:45 PM UTC-5, Rob Reynolds wrote:



 On Thu, Jun 26, 2014 at 9:33 AM, Ken Sykora  wrote:

> I'm currently trying to prevent a specific package from continuing its 
> install run on subsequent puppet apply commands. The package in Question 
> is 
> the Windows Azure SDK for .Net 2.3. The package's name listed in the 
> registry contains an endash (–) instead a normal hyphen.
>
>
> 
> In puppet, it shows up like this:
>
> PS C:\Users\vagrant> puppet resource package | sls Azure
>> package { 'Windows Azure Authoring Tools - v2.3':
>> package { 'Windows Azure Command Line Tools':
>> package { 'Windows Azure Compute Emulator - v2.3':
>> *package { 'Windows Azure Libraries for .NET û v2.3':*
>> package { 'Windows Azure Pack - PowerShell API - 2013':
>> package { 'Windows Azure PowerShell - May 2014':
>> package { 'Windows Azure Storage Tools - v2.2.2':
>> package { 'Windows Azure Tools for Microsoft Visual Studio 2013 - 
>> v2.3':
>
>
> However, querying for it specifically seems difficult -- this is what 
> I can't figure out:
>
> PS C:\Users\vagrant> puppet resource package "Windows Azure Libraries 
>> for .NET – v2.3"
>> package { 'Windows Azure Libraries for .NET û v2.3':
>>   ensure => 'absent',
>> }
>> PS C:\Users\vagrant> puppet resource package "Windows Azure Libraries 
>> for .NET û v2.3"
>> package { 'Windows Azure Libraries for .NET √ v2.3':
>>   ensure => 'absent',
>> }
>
>
> How can I reference this package by it's correct name so the installer 
> doesn't run multiple times on provisioning?
>

 What does putting the endash in the manifest do for your run?  

>  -- 
> You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/277a5958-3920-4c53-826e-0db76315ab7a%
> 40googlegroups.com 
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



 -- 
 Rob Reynolds
 Developer, Puppet Labs

 *Join us at PuppetConf 2014 , September 
 20-24 in San Francisco*
 *Register by July 31st to take advantage of the Early Bird discount 
  **—**save 
 $249!*
  
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/ab661fc5-0200-4d69-adfa-4eb04a0c08ea%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2014 , September 
> 20-24 in San Francisco*
> *Register by July 31st to take advantag

Re: [Puppet Users] Managing config files...

2014-07-15 Thread Felix Frank
On 07/15/2014 11:08 PM, fatmcgav wrote:
> I've been trying to work up a Augeas lense to support jre.properties,
> but dont seem to be having much luck... Seems like there's a bit of a
> black art to writing them... 
Oh, right, I forget...yes we mortals are not supposed to be able to just
create new lenses :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C59B27.1080500%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet catalog transfer often gets truncated (Could not intern from pson: error)

2014-07-15 Thread Felix Frank
On 07/15/2014 01:47 PM, Daniel wrote:
> I am also getting this problem. Did running the puppet master
> within Apache/Passenger or nginx/Passenger help at all?
>
> I was thinking it could be to do with a non ascii character making its
> way into my code somewhere as that seems to cause dodgy stuff but
> that's not it. I've seen lots of suggestions but I get the feeling it
> must be a bug with puppet.
>
> Not able to view the ticket as it looks like projects.puppetlabs.com
> is down currently.
>
> I am using opensource:
>
> ruby-1.8.7.352-13.el6.x86_64
> puppet-2.7.25-2.el6.noarch
> puppet-server-2.7.25-2.el6.noarch
>
> Dan

Wow, that issue is *old* :-) Hasn't been migrated to Jira, either.

According to Redmine, moving to Passenger has helped at least one user,
apparently.

HTH,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C59938.8090304%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Managing config files...

2014-07-15 Thread fatmcgav
Felik

Cheers for taking the time to reply...

I've been trying to work up a Augeas lense to support jre.properties, but
dont seem to be having much luck... Seems like there's a bit of a black art
to writing them...

I'm in two minds about wrapper.conf. I've got it templates currently, but
like you say I'm not sure how to best handle the existing default values
plus any new values that might be needed... Or perhaps I just don't support
overriding existing values.. Though that feels like a bit of a short cut to
me...

Anyone else?

Cheers
Gavin
On 15 Jul 2014 21:52, "Felix Frank"  wrote:

>  On 07/14/2014 02:49 PM, Gavin Williams wrote:
>
> I think the 2 provided examples give different challenges.
> *jre.properties*[3] strikes me as the most troublesome initially, due to
> the nature of the contents and the format reqs...
> My initial thought is to provide a type that can manage the file, and
> possibly use Augeas to manage the file. Happy for other suggestions though
> :)
>
>
> If I'd need Puppet to manage that, I'd likely want to be able to manage
> each LeftHandSide/ListElement pair via ensure. I.e., I don't want to
> enumerate the full lists in manifest or hiera, but just want to make sure
> distinct elements are there ore not.
>
> *wrapper.conf*[4] looks like it should be fairly easy to template. The
> only thing I'm not sure on is how to handle the incrementing nature of the
> param lines...
> I'd like to keep the number of resource params as light as possible, as
> there's no way I can expose all the possible config lines, so I'm thinking
> maybe use an array for each 'set' of config lines, e.g.
> 'wrapper.java.classpath' and 'wrapper.java.additional'... But then how do I
> handle over-riding pre-existing config values? Is there a better way to
> handle this file?
>
>
> I think you rather mean - how to *keep* existing values and only manage
> certain entries of the array.
> I fear that won't work. And I concur that arrays would be a good choice
> here. Perhaps an alternative API that takes an index/value hash instead
> would be useful to some, but seems like abysimal mileage to me.
>
> I haven't dabbled in augeasproviders yet (which is a shame), but imagine
> that it would be a good approach for both files (unless of course the
> latter can just be templated).
>
> Cheers,
> Felix
>
> --
> 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/9aFzgCU0GCo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/53C5948A.3080707%40Alumni.TU-Berlin.de
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGJCw3gjO1hkvb3y%2BHvs-_nc34rvQJ36SSkYQHgmd-HgYBcK2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] unable to use varaible in creates attribute

2014-07-15 Thread Felix Frank
On 07/14/2014 05:54 PM, Supriya Uppalapati wrote:
> Hi,
>  
> I am trying to install software using .zip file. I am defining values
> using varaibles. But it is throwing me an error.
>  
> *Error: Parameter cwd failed on Exec[extract CZM8XML.zip]: cwd must be
> a fully qualified path at
> /etc/puppetlabs/puppet/environments/development/modules/staging/manifests/extract.pp:106
> Wrapped exception:
> cwd must be a fully qualified path*
>  
> My code is here

We'll need to see the definition of staging::deploy to comment on this.

Thanks,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C597CC.5000804%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet modules export?

2014-07-15 Thread Felix Frank
On 07/13/2014 11:41 PM, Tibor Malomsoki wrote:
> I get two puppetserver:
> A) Puppetserver: this is the old (I have got modules)
> B) Puppetserver: this is the new (I haven't got modules)
>
> I coppy the enviroments, moduls etc... But the agent nothing changed
> (catalog always finished).
> What shell I do?
>
> OS: Ubuntu

What do you expect the agent to change?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C59747.5010102%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Checking a variable is not 'undef'

2014-07-15 Thread Felix Frank
On 07/14/2014 05:07 PM, Henrik Lindberg wrote:
>>  From my point of view is better a warning when a empty string is taken
>> as a false, than some configuration applied erroneously once upgraded
>> to 4.0
>>
>
> We encourage testing with 3.7 future parser. If it turns out to be a
> problem for many (breakage due to undef/'' change) we will see what we
> can do about it. We are not sure we can find and efficiently check all
> occurrences as it involves reporting all places where an undef was not
> turned into a string that is passed off to logic that may or may not
> compare it to a Boolean. (This is the very essence of the problem; not
> knowing if something is a defined string or not later in the evaluation). 

The warning would also cause a false sense of security - just because
your *current* manifest and data are clean of "" == false assumptions,
it's not assured that there are no lurking conditionals that are prone
to break once a node has a change to its data or facts, or a new node
with such data appears.

There will be no alternative but to carefully review our code before the
Puppet 4 upgrade. Checking for catalog differences from the future
parser will help, too.

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C596F1.3020408%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Managing config files...

2014-07-15 Thread Felix Frank
On 07/14/2014 02:49 PM, Gavin Williams wrote:
> I think the 2 provided examples give different challenges.
> /jre.properties/[3]//strikes me as the most troublesome initially, due
> to the nature of the contents and the format reqs...
> My initial thought is to provide a type that can manage the file, and
> possibly use Augeas to manage the file. Happy for other suggestions
> though :)

If I'd need Puppet to manage that, I'd likely want to be able to manage
each LeftHandSide/ListElement pair via ensure. I.e., I don't want to
enumerate the full lists in manifest or hiera, but just want to make
sure distinct elements are there ore not.

> /wrapper.conf/[4]//looks like it should be fairly easy to template.
> The only thing I'm not sure on is how to handle the incrementing
> nature of the param lines...
> I'd like to keep the number of resource params as light as possible,
> as there's no way I can expose all the possible config lines, so I'm
> thinking maybe use an array for each 'set' of config lines, e.g.
> 'wrapper.java.classpath' and 'wrapper.java.additional'... But then how
> do I handle over-riding pre-existing config values? Is there a better
> way to handle this file?

I think you rather mean - how to *keep* existing values and only manage
certain entries of the array.
I fear that won't work. And I concur that arrays would be a good choice
here. Perhaps an alternative API that takes an index/value hash instead
would be useful to some, but seems like abysimal mileage to me.

I haven't dabbled in augeasproviders yet (which is a shame), but imagine
that it would be a good approach for both files (unless of course the
latter can just be templated).

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C5948A.3080707%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet-postgres error

2014-07-15 Thread Felix Frank
Hi,

it would be helpful to see the manifest that declares the Exec[validate
postgres connection for /postgres].

For debugging, the easiest approach is pasting the failing commands to a
shell.

Regards,
Felix

On 07/14/2014 08:35 AM, Rajesh Taneja wrote:
> While running puppet agent, I am getting following error. Can someone
> help me understand what might be wrong.
>
> Warning: Exec[validate postgres connection for
> /postgres](provider=posix): Cannot understand environment setting
> "PGPASSWORD="
> Warning: Exec[validate postgres connection for
> /postgres](provider=posix): Cannot understand environment setting
> "PGPASSWORD="
> Notice:
> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
> postgres connection for /postgres]/returns: Unable to connect to
> defined database using: /usr/bin/psql --tuples-only --quiet -h  -U  -p
>  --dbname postgres 
> Error: echo 'Unable to connect to defined database using:
> /usr/bin/psql --tuples-only --quiet -h  -U  -p  --dbname postgres ' &&
> false returned 1 instead of one of [0]
> Error:
> /Stage[main]/Postgresql::Server::Service/Postgresql::Validate_db_connection[validate_service_is_running]/Exec[validate
> postgres connection for /postgres]/returns: change from notrun to 0
> failed: echo 'Unable to connect to defined database using:
> /usr/bin/psql --tuples-only --quiet -h  -U  -p  --dbname postgres ' &&
> false returned 1 instead of one of [0]
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users+unsubscr...@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d4866842-9ae8-4ade-89c9-34aa9e82e074%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C591E8.5060003%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Error_Install_Java7

2014-07-15 Thread Felix Frank
On 07/11/2014 02:48 PM, Joni Silaban wrote:
> Guys, Please help me to solve the error like picture Thank you
Please paste your error output as text in the future.

The issue is likely that the JDK tarball is not in the java7 module as
referenced by the manifest.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53C58F83.9060203%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] multiple VMs from a single node.pp file

2014-07-15 Thread Brian Mathis
Off the top of my head I would think that you could either use the
'default' node, which would apply to all clients, or use a regular
expression to match the node names.  With the regex you'll need to ensure
that each VM follows a naming convention and you probably also want to make
sure you don't have multiple machines with identical names.  You can read
more about that here:

http://docs.puppetlabs.com/puppet/latest/reference/lang_node_definitions.html#the-default-node

You really don't need to do anything special with the certname -- they can
all be different.  You'll have to sign the cert for each new node as a
developer brings it online, unless you use the autosign option (which has
potential security implications).  After all, Puppet is meant to manage
many nodes with the same configuration.


❧ Brian Mathis
@orev


On Tue, Jul 15, 2014 at 3:09 PM, randal cobb  wrote:

> Hello, all...
>
> I have a scenario where all of our developers (spread geographically
> around the world) use a VMWare or VirtualBox VM on their local desktop to
> develop portions of a single product.  I've seemed to inherit this
> nightmare of a process and believe I can make it much simpler, quicker, and
> cleaner using Puppet.  Currently, they have to download an 80Gb VM image
> from a single server in the US; so, because of the massive size of the VM,
> most developers never upgrade their VMs to the latest image.   I know that
> Puppet can fix this for me, but I have a few questions I'm hoping y'all can
> help answer (I've used puppet for a few months to manage some
> infrastructure servers, so concepts aren't alien to me).  Here are my
> questions:
>
> Supposed I have 200 different machines (VMs) sitting on each developer's
> desktop (rather in their VMware hypervisor)...
> 1) can they all have the same certname, so I only have to maintain a
> single node.pp manifest?
> 2) If so, how are SSL certs maintained, given there would be 200 different
> VMs trying to use the same set of certs.  Or, does that even matter from a
> node perspective?
> 3) If not, do I REALLY have to maintain 200 different manifests; all
> identical to each other?
>
> I've been able to put together a single node.pp file that sets up
> everything for them, so they only download a 2.8Gb bare VM image and puppet
> does the rest.  But, when firing up subsequent VMs, of course the client
> gets all confused because the generated certs don't match up.
>
> Any suggestions for a better solution, or workaround to this one?  (I've
> thought about using NAT and a fixed MAC address, but with so many
> developers out there, I'm sure some will re-create MAC addresses at some
> point during their initial setup, or change their networking type for the
> VM and start flooding the network with duplicated mac errors).
>
> I'm sure I'm not the first person who's wanted to do something like this,
> so I turn to the seasoned puppet veterans for guidance!   I HAVE googled
> for solutions, but I may just not be using the right terminology to search
> with; because I keep coming up blank on how best to tackle this.
>
> Thanks in advance!
> Randy
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/be08e15f-44da-43f4-9f6a-8d10630ebefa%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALKwpEw20MY9raz%3D%2BQpNcmdy_Ws4-wo%3D3zRqiCfRGYYbtEEk5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] multiple VMs from a single node.pp file

2014-07-15 Thread Peter Bukowinski

On Jul 15, 2014, at 3:09 PM, randal cobb  wrote:

> Hello, all...
> 
> I have a scenario where all of our developers (spread geographically around 
> the world) use a VMWare or VirtualBox VM on their local desktop to develop 
> portions of a single product.  I've seemed to inherit this nightmare of a 
> process and believe I can make it much simpler, quicker, and cleaner using 
> Puppet.  Currently, they have to download an 80Gb VM image from a single 
> server in the US; so, because of the massive size of the VM, most developers 
> never upgrade their VMs to the latest image.   I know that Puppet can fix 
> this for me, but I have a few questions I'm hoping y'all can help answer 
> (I've used puppet for a few months to manage some infrastructure servers, so 
> concepts aren't alien to me).  Here are my questions:
> 
> Supposed I have 200 different machines (VMs) sitting on each developer's 
> desktop (rather in their VMware hypervisor)... 
> 1) can they all have the same certname, so I only have to maintain a single 
> node.pp manifest?

No. Each vm/puppet agent needs a unique cert.

> 2) If so, how are SSL certs maintained, given there would be 200 different 
> VMs trying to use the same set of certs.  Or, does that even matter from a 
> node perspective?
> 3) If not, do I REALLY have to maintain 200 different manifests; all 
> identical to each other?

You don't need to maintain 200 different manifests. If you organize the 
resources you wish to manage into one or more classes (or modules), you can 
solve your problem without having to specify any puppet clients.

> I've been able to put together a single node.pp file that sets up everything 
> for them, so they only download a 2.8Gb bare VM image and puppet does the 
> rest.  But, when firing up subsequent VMs, of course the client gets all 
> confused because the generated certs don't match up.
> 
> Any suggestions for a better solution, or workaround to this one?  (I've 
> thought about using NAT and a fixed MAC address, but with so many developers 
> out there, I'm sure some will re-create MAC addresses at some point during 
> their initial setup, or change their networking type for the VM and start 
> flooding the network with duplicated mac errors).

A simple way to take what you have now and make it work for all 200 instances 
of the VM is to wrap all the resources you have now in your nodes.pp file into 
a class. Then include that class in the default node definition. Your new 
nodes.pp file should resemble this:

class vm_config {
# All your existing puppet code
# should go inside here. You may wish to subdivide
# the resources logically into separate classes.
# If you do this, also include those classes
# below.
}

node default {
include vms
}

The default node definition will apply to any node that hasn't matched any 
other node definition. Since this is the only one -- remove any other node 
definitions -- it will apply to all puppet nodes.

> I'm sure I'm not the first person who's wanted to do something like this, so 
> I turn to the seasoned puppet veterans for guidance!   I HAVE googled for 
> solutions, but I may just not be using the right terminology to search with; 
> because I keep coming up blank on how best to tackle this.

My suggestion above isn't the best way to go about it, either. If you ever want 
to manage anything besides these VMs, you'll need to modify the nodes.pp file. 
However, at that time, you may have a better grasp of puppet.

> Thanks in advance!
> Randy

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/41B3B810-11C5-4B36-BA0D-F5383D0E07A7%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-15 Thread José Luis Ledesma
It worked as you thought.

Many thanks, perhaps the code is not so nice, but the config applied is, by
far, better.

Regards,
El 15/07/2014 15:24, "jcbollinger"  escribió:

>
>
> On Monday, July 14, 2014 8:55:38 AM UTC-5, Kristof Willaert wrote:
>>
>> [snip]
>>
>> You will not be able to collect that resource on the node that exports it
>>> (you would again -- and rightfully -- get a duplicate resource complaint),
>>> but I think otherwise you should be ok.
>>>
>>
>> The documentation for exported resources suggests otherwise:
>>
>> Any node (including the node that exported it) can then *collect* the
>> exported resource and manage its own copy of it. [1]
>>
>> I must say I haven't tried it myself, but unless I misinterpret the
>> sentence above, it should be possible.
>>
>
>
> You're not misinterpreting the docs, but you *are* misinterpreting my
> statement.  Although *generally* the node exporting a resource can
> collect that resource, if the OP used the approach I described then his
> nodes would not be able to collect the Site::Secondary_host resources they
> declare themselves.  If they tried to collect their own, then it would
> yield a duplicate Host resource (from the defined type body; because he
> already, separately, declares a Host for the node itself).  The key there
> is that -- I think -- the type's body will not be evaluated by the
> declaring node for instances that it does not collect, even those that it
> declares itself.
>
>
> John
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/e05c726c-b0ca-40be-8f5a-a38df765a9cf%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [Puppet Users] Dealing with Packages on Windows that contain special characters

2014-07-15 Thread Rob Reynolds
I think we can call this a valid issue. Would you mind filing a ticket over
on https://tickets.puppetlabs.com/browse/PUP? Thanks!


On Fri, Jul 11, 2014 at 3:24 PM, Ken Sykora  wrote:

> Also I'm noticing that on successful runs with the UTF-8 character I get
> this error:
>
> Error: Failed to apply catalog: incompatible character encodings: UTF-8
> and IBM437
>
>
> On Friday, July 11, 2014 2:57:13 PM UTC-5, Ken Sykora wrote:
>>
>> Sorry for the late reply, Rob.
>>
>> Putting the endash as a unicode character in my manifest causes it to
>> miss the package being already installed.
>>
>>   file { "${tempDirectory}WindowsAzureLibsForNet-x64.msi":
>> ensure => present,
>> source => 'puppet:///modules/packages/WindowsAzureLibsForNet-x64.
>> msi',
>>   }
>>   ->
>>   package { 'Azure Libraries for .NET – v2.3':
>> ensure  => '2.3.0424.070',
>> source  => "${tempDirectory}WindowsAzureLibsForNet-x64.msi"
>>   }
>>
>> When I run my manifest I get this:
>>
>>   Notice: /Stage[main]/Packages::Msi/Package[Azure Libraries for .NET
>> ΓÇô v2.3]/ensure: created
>>
>> On Monday, June 30, 2014 2:04:45 PM UTC-5, Rob Reynolds wrote:
>>>
>>>
>>>
>>> On Thu, Jun 26, 2014 at 9:33 AM, Ken Sykora  wrote:
>>>
 I'm currently trying to prevent a specific package from continuing its
 install run on subsequent puppet apply commands. The package in Question is
 the Windows Azure SDK for .Net 2.3. The package's name listed in the
 registry contains an endash (–) instead a normal hyphen.


 
 In puppet, it shows up like this:

 PS C:\Users\vagrant> puppet resource package | sls Azure
> package { 'Windows Azure Authoring Tools - v2.3':
> package { 'Windows Azure Command Line Tools':
> package { 'Windows Azure Compute Emulator - v2.3':
> *package { 'Windows Azure Libraries for .NET û v2.3':*
> package { 'Windows Azure Pack - PowerShell API - 2013':
> package { 'Windows Azure PowerShell - May 2014':
> package { 'Windows Azure Storage Tools - v2.2.2':
> package { 'Windows Azure Tools for Microsoft Visual Studio 2013 -
> v2.3':


 However, querying for it specifically seems difficult -- this is what I
 can't figure out:

 PS C:\Users\vagrant> puppet resource package "Windows Azure Libraries
> for .NET – v2.3"
> package { 'Windows Azure Libraries for .NET û v2.3':
>   ensure => 'absent',
> }
> PS C:\Users\vagrant> puppet resource package "Windows Azure Libraries
> for .NET û v2.3"
> package { 'Windows Azure Libraries for .NET √ v2.3':
>   ensure => 'absent',
> }


 How can I reference this package by it's correct name so the installer
 doesn't run multiple times on provisioning?

>>>
>>> What does putting the endash in the manifest do for your run?
>>>
  --
 You received this message because you are subscribed to the Google
 Groups "Puppet Users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/277a5958-3920-4c53-826e-0db76315ab7a%
 40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> --
>>> Rob Reynolds
>>> Developer, Puppet Labs
>>>
>>> *Join us at PuppetConf 2014 , September
>>> 20-24 in San Francisco*
>>> *Register by July 31st to take advantage of the Early Bird discount
>>>  **—**save
>>> $249!*
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ab661fc5-0200-4d69-adfa-4eb04a0c08ea%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014 , September
20-24 in San Francisco*
*Register by July 31st to take advantage of the Early Bird discount
 **—**save $249!*

-- 
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+un

[Puppet Users] multiple VMs from a single node.pp file

2014-07-15 Thread randal cobb
Hello, all...

I have a scenario where all of our developers (spread geographically around 
the world) use a VMWare or VirtualBox VM on their local desktop to develop 
portions of a single product.  I've seemed to inherit this nightmare of a 
process and believe I can make it much simpler, quicker, and cleaner using 
Puppet.  Currently, they have to download an 80Gb VM image from a single 
server in the US; so, because of the massive size of the VM, most 
developers never upgrade their VMs to the latest image.   I know that 
Puppet can fix this for me, but I have a few questions I'm hoping y'all can 
help answer (I've used puppet for a few months to manage some 
infrastructure servers, so concepts aren't alien to me).  Here are my 
questions:

Supposed I have 200 different machines (VMs) sitting on each developer's 
desktop (rather in their VMware hypervisor)... 
1) can they all have the same certname, so I only have to maintain a single 
node.pp manifest?
2) If so, how are SSL certs maintained, given there would be 200 different 
VMs trying to use the same set of certs.  Or, does that even matter from a 
node perspective?
3) If not, do I REALLY have to maintain 200 different manifests; all 
identical to each other?

I've been able to put together a single node.pp file that sets up 
everything for them, so they only download a 2.8Gb bare VM image and puppet 
does the rest.  But, when firing up subsequent VMs, of course the client 
gets all confused because the generated certs don't match up.

Any suggestions for a better solution, or workaround to this one?  (I've 
thought about using NAT and a fixed MAC address, but with so many 
developers out there, I'm sure some will re-create MAC addresses at some 
point during their initial setup, or change their networking type for the 
VM and start flooding the network with duplicated mac errors).  

I'm sure I'm not the first person who's wanted to do something like this, 
so I turn to the seasoned puppet veterans for guidance!   I HAVE googled 
for solutions, but I may just not be using the right terminology to search 
with; because I keep coming up blank on how best to tackle this.

Thanks in advance!
Randy

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/be08e15f-44da-43f4-9f6a-8d10630ebefa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Invoke another agent within agent

2014-07-15 Thread Larry Altomare
Hi,

I have created a custom agent to deploy code, from this agent I would like 
to leverage the code in the nrpe agent and invoke it from my agent. Is it 
possible to invoke another agent from an agent.

Here is a snippet of my code.

module MCollective
  module Agent
class Resindeployhttps://groups.google.com/d/msgid/puppet-users/c98a4229-c99c-4fb4-85e5-c2732fe3016e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: MCollective 2.5.3 [Security and Bug Fix Release]

2014-07-15 Thread Melissa Stone
MCollective 2.5.3 is a security and bug fix release in the MCollective 2.5
series. This release addresses CVE-2014-3251.

** CVE-2014-3251 **
The MCollective `aes_security` public key plugin does not correctly
validate certs against the CA. By exploiting this vulnerability within
a race/initialization window, an attacker with local access could
initiate an unauthorized MCollective client connection with a server,
and thus control the mcollective plugins running on that server. This
vulnerability requires a collective be configured to use the
aes_security plugin. Puppet Enterprise and open source MCollective are
not configured to use the plugin and are not vulnerable by default.
CVSSv2 Score: 3.4
Vector: AV:L/AC:H/Au:M/C:P/I:N/A:C/E:POC/RL:OF/RC:C

Affected software versions:
MCollective (all, not configured by default)
Puppet Enterprise (all, not configured by default)

Fixed software versions:
MCollective 2.5.3
Puppet Enterprise 3.3.0

For more information on this vulnerability, please visit
https://puppetlabs.com/security/cve/cve-2014-3251

Please read through the Release Notes for the full list of changes:
http://docs.puppetlabs.com/mcollective/releasenotes.html

To report issues with the release, file a ticket in the "MCO" project on
http://tickets.puppetlabs.com/ and set the "Affects version/s" field to
"2.5.3"

-- 
Melissa Stone
Release Engineer, Puppet Labs

*Join us at PuppetConf 2014 , September
20-24 in San Francisco*
*Register by July 31st to take advantage of the Early Bird discount
 **—**save $249!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAHEe_kq%2BnFRyA1dub1QCSdwRBZpwH_4Vg%3D9Bo7kMY1rv1Kr88A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Just Released: Puppet Enterprise 3.3

2014-07-15 Thread Chris Westphal


Puppet Enterprise 3.3 is now available! Our newest release makes it easier 
to install, adopt and scale Puppet Enterprise across a broad range of 
supported platforms. Here’s a quick look at what’s new:


   - *Simplified installation process:* Our new web-based installer 
   provides a detailed walkthrough, whether you need a basic installation or a 
   multi-server deployment.


   - *Expanded platform support:* RHEL 7, Ubuntu 14.04 LTS and Windows 
   Server 2012 R2 have been added to existing support for enterprise 
   platforms. This release also introduces agent installation to a broader 
   range of platforms, including AIX, Solaris 10 and RHEL 4, making it easier 
   to manage mixed-platform environments.


   - *New supported modules:* We’ve added the VCS Repo module, Windows ACL 
   module and Windows PowerShell module to our growing list of Puppet 
   Enterprise supported modules. Find them here: 
   http://forge.puppetlabs.com/supported


   - *Increased visibility into your infrastructure:* You can now export 
   data captured by the Puppet Enterprise console and import it into the tool 
   of your choice to create reports for your team.


*Take a deeper dive into the latest release*


Read the blog post here:

http://puppetlabs.com/blog/puppet-enterprise-3.3-get-started-faster

Ready to get started? Download Puppet Enterprise 3.3 here: 

http://puppetlabs.com/download-puppet-enterprise

Review the docs here: 

*http://docs.puppetlabs.com/pe/latest/ 
*

Find instructions for upgrading from a prior version of Puppet Enterprise 
here: 

http://docs.puppetlabs.com/pe/latest/install_upgrading.html 

See Puppet Enterprise 3.3 in action in one of our live technical webinars:

   - 
   
   Tuesday, July 22, at 11 am PDT: Register here 
   
   - 
   
   Thursday, July 24th at 2pm BST: Register here 
   
   



We look forward to your feedback on this release!

Thanks,
Chris Westphal

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9328643a-62cc-4dea-9c08-780188580849%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter unable to parse custom fact

2014-07-15 Thread Peter Bukowinski
On Jul 15, 2014, at 10:10 AM, Maxim Nikolaev  wrote:

> Hello
> 
> I have strange experience with facter on newly installed servers.
> 
> Puppet: 3.6.2
> Facter: 2.1.0
> OS: Amazon Linux
> 
> when I set custom fact to /etc/facter/facts.d and run facter locally I get 
> following error
> Fact file /etc/facter/facts.d/services.rb was parsed but returned an empty 
> data set
> 
> 
> When I copy same file to 
> /usr/lib/ruby/site_ruby/1.8/facter/
> and run same command - facter works ok.
> 
> 
> Can someone advise why thi can happen?

When using external facts -- those placed into /etc/facter/facts.d -- on linux, 
you can use either structured data (yaml, json, or txt), or executable files 
(shell/ruby/python/perl/etc) to generate facts, but the content/output of these 
executable files must be in 'key=value'.

If you are unable to run '/etc/facter/facts.d/services.rb' directly from the 
terminal and have it generate STDOUT in the form of 'factname=factvalue' then 
you must modify it so that it does. Check that you have a shebang line (like 
'#!/usr/bin/env ruby') at the top and that the file is executable.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52582ED6-48CD-44F6-BEAA-A1C9E7A2BBA4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Facter unable to parse custom fact

2014-07-15 Thread Maxim Nikolaev
Hello

I have strange experience with facter on newly installed servers.

Puppet: 3.6.2
Facter: 2.1.0
OS: Amazon Linux

when I set custom fact to /etc/facter/facts.d and run facter locally I get 
following error
Fact file /etc/facter/facts.d/services.rb was parsed but returned an empty 
data set


When I copy same file to 
/usr/lib/ruby/site_ruby/1.8/facter/
and run same command - facter works ok.


Can someone advise why thi can happen?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9aecde68-a28d-436b-a28c-9a97432bc739%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Apply patch once to windows node

2014-07-15 Thread Dhaval Thakar
Hi All,

I am starting to use puppet to manage windows nodes, tried searching but 
couldn't find solution for this...

I need to apply kaspersky patch using puppet to windows nodes. So far I have 
used kaspersky server to install / upgrade / patch antivirus. Trying to get it 
done using puppet.

Can someone guide me to run windows command on nodes only once ? This patch 
does not update installed application version hence couldn't use Package in 
manifest file.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8cd596ed-048f-4c92-a45e-bcce9fe4d3c9%40email.android.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Duplicate declaration with nested create_resources

2014-07-15 Thread jcbollinger


On Monday, July 14, 2014 8:08:51 AM UTC-5, Joao Morais wrote:
>
>
> Em sexta-feira, 11 de julho de 2014 11h11min17s UTC-3, jcbollinger 
> escreveu:
>>
>>
>> So, I'm interpreting the hiera data as providing configuration details 
>> that, if present, apply to every 'myservice', at least as defaults.  
>> Furthermore, from the data and manifests I judge that 'myproblematicconfig' 
>> is a distinguished identifier, handled in a manner specific to it.
>>
>
> Almost that. I have quite some configurations like that but almost all of 
> them are applied on a single ERB template. The "problematicconfig", on the 
> other hand, will manage different files. So AFAICS the iteration need to be 
> at the Puppet manifest side. create_resources() is the way I have found to 
> iterate a hash without parser=future.
>
>
> A different structure for your data might work better
>>
>
> Share your thoughts! No problem with some refactor.
>


I didn't have a specific idea there, I'm afraid.  I don't have a 
sufficiently firm grasp of what you're trying to do, or of the overall 
structure of [this part of] your manifest set to make a specific 
recommendation.  My main point there is what I said elsewhere: your data 
don't give complete details of the resources you want to create, so they 
are not well structured for use with create_resources().

 

>
>
> , but you can also work with the data structure you already have.  In 
>> particular, create_resources() can often be replaced by an array-titled 
>> resource declaration with the array drawn from the keys() of your resource 
>> hash.  Combinatorial resource declarations are a bit trickier, but they can 
>> be done, even without the future parser.
>>
>
> Got the idea, nice approach with keys+regsubst, thank you very much.
>
>
> You may be able to make that cleaner, simpler, or otherwise better by 
>> applying some of your knowledge of the problem space to the structure of 
>> the defined types.
>>
>
> Digging a bit more into the problem I found another approach: define a 
> local variable with the $title just before the hiera_hash call, and use 
> such local variable in the hash declaration. Something like this:
>
> Manifest:
>   class profile::my::myservice {
> $mytitle_hiera = $title
> # ENC: $myservices
> $hiera_myservice_host = hiera("myservice_host")
> # ENC has per-host/service and hiera has per-environment configurations
> create_resources(::myservice::host, $myservices, $hiera_myservice_host)
>   }
>
> Hiera:
>   myservice_host:
> myproblematicconfig:
>   %{mytitle_hiera}_config1:
> data
>   %{mytitle_hiera}_config2:
> data
> myotherconfig:
> ...
>
> It worked like a charm in my configuration. On the other hand Puppet 
> docs[1] says this is not a good practice. I follow the doc in the sense 
> that the lookup will be dependent of a manifest configuration.
>


I'm glad the docs say that, because the approach you describe makes me 
queasy.  I'm sure it does work, but a substantial part of the reason for 
externalizing data is to decouple it from your manifests.  Interpolating 
manifest-based data -- especially context-sensitive manifest-based data -- 
into your external data runs directly counter to that objective.  
Furthermore, your data are no longer independently meaningful, and you 
assume an additional burden of including the correct interpolation 
expression in your data everywhere one is needed.

 

> Best practices, straightforward code and fit the needs are really 
> challenging.
>


Yes, they can be.  The future parser will make that a bit easier.  You 
could also consider whether you could improve your situation with a custom 
function or two.  More generally, I think people really need to adopt the 
correct mindset to be effective at developing Puppet manifests and 
modules.  Specifically, it is best to recognize that when you work on 
manifests, you are engaging in *modelling*, not programming.  That applies 
even when you engage the more programming-like features available in the 
future parser.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/334f95e8-19d5-4165-b443-998cb1bd2aea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: duplicated resource with an exported resource

2014-07-15 Thread jcbollinger


On Monday, July 14, 2014 8:55:38 AM UTC-5, Kristof Willaert wrote:
>
> [snip]
>
> You will not be able to collect that resource on the node that exports it 
>> (you would again -- and rightfully -- get a duplicate resource complaint), 
>> but I think otherwise you should be ok.  
>>
>
> The documentation for exported resources suggests otherwise:
>
> Any node (including the node that exported it) can then *collect* the 
> exported resource and manage its own copy of it. [1]
>
> I must say I haven't tried it myself, but unless I misinterpret the 
> sentence above, it should be possible.
>


You're not misinterpreting the docs, but you *are* misinterpreting my 
statement.  Although *generally* the node exporting a resource can collect 
that resource, if the OP used the approach I described then his nodes would 
not be able to collect the Site::Secondary_host resources they declare 
themselves.  If they tried to collect their own, then it would yield a 
duplicate Host resource (from the defined type body; because he already, 
separately, declares a Host for the node itself).  The key there is that -- 
I think -- the type's body will not be evaluated by the declaring node for 
instances that it does not collect, even those that it declares itself.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e05c726c-b0ca-40be-8f5a-a38df765a9cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Problem using hiera-eyaml

2014-07-15 Thread Levent Tutar
eyaml commands were working but not hiera-eyaml. 
the following solved my problem. 
default gem install uses the wrong gem environment. puppet uses a different 
one.
use /opt/puppet/bin/gem to install hiera-eyaml instead of default 
/usr/local/bin/gem

On Thursday, January 2, 2014 4:44:32 PM UTC+1, Kit Plummer wrote:
>
> Hey Werner.  
>
> I just added the 'read' permission to the global setting on the installed 
> gems' directories after the 'gem install' command.  I had to do it for 
> hiera-eyaml and the gems that were installed with it.
>
> Kit.
> On Jan 2, 2014 8:39 AM, "Werner Bahlke" > 
> wrote:
>
>> Hi Kit,
>>
>> I am glad you found the cause. Can you tell me a bit more how you 
>> resolved it? I probably can figure it out eventually but any hints will be 
>> greatly appreciated.
>>
>> Thanks,
>>
>> Werner
>>
>>
>> On Mon, Dec 30, 2013 at 11:17 AM, Kit Plummer > > wrote:
>>
>>> Hey Werner.  I did resolve my issue.  It turned out to be a path issue, 
>>> with how the PE’s rubygems installs gems.  While the eyaml commands were 
>>> working, the directory for the hiera-eyaml (and it’s dependent gems) didn’t 
>>> allow the pe-puppet user (global perms) to get to the lib .rb files in the 
>>> installed gems.
>>>
>>> It’s a bug and I need to remember to file it.
>>>
>>> Kit
>>>
>>>
>>> --
>>> From: wernerbahlke werner...@gmail.com 
>>> Reply: puppet...@googlegroups.com  
>>> puppet...@googlegroups.com 
>>> Date: December 30, 2013 at 9:12:48 AM
>>> To: puppet...@googlegroups.com  puppet...@googlegroups.com 
>>> 
>>> Subject:  [Puppet Users] Re: Problem using hiera-eyaml
>>>
>>> >
>>> > Hi Kit,
>>> >
>>> > Thanks for posting. No, I did not resolve it and have put it on the
>>> > back
>>> > burner. Quite possible that it is a Ruby / gems issue.
>>> >
>>> > Keep us posted if you resolve it before me.
>>> >
>>> > Werner
>>> >
>>> > On Saturday, December 21, 2013 11:13:46 AM UTC-5, Kit Plummer
>>> > wrote:
>>> > >
>>> > > Did you resolve this?
>>> > >
>>> > > I'm having a similar problem. But, I think it is because the eyaml
>>> > > backend isn't getting loaded :) :
>>> > >
>>> > > "Cannot load backend eyaml: cannot load such file --
>>> > > hiera/backend/eyaml_backend"
>>> > >
>>> > > I'm wondering if this is because the Ruby version/Gems that
>>> > are used by PE.
>>> > >
>>> > > On Friday, December 6, 2013 8:10:35 AM UTC-7, wernerbahlke
>>> > wrote:
>>> > >>
>>> > >> I am trying to use hiera-eyaml and have followed the README
>>> > instructions.
>>> > >>
>>> > >> eyaml seems to work, I can encrypt and decrypt files and passwords.
>>> > >>
>>> > >> I can also use hiera -c to get at an encrypted value like so:
>>> > >>
>>> > >> hiera -c /etc/puppetlabs/puppet/hiera.yaml rootpwd
>>> > >>
>>> > >> But when running this simple test module it fails with cannot
>>> > find the
>>> > >> data item rootpwd defined in hieradata/defaults.eyaml.
>>> > >>
>>> > >> class test {
>>> > >> $test = hiera('test')
>>> > >> $rootpwd = hiera('rootpwd')
>>> > >> notify { "Test: ${test}": }
>>> > >> }
>>> > >> If I just have the test variable defined in defaults.yaml it
>>> > works fine.
>>> > >> So it cannot find the defaults.eyaml file.
>>> > >>
>>> > >> Here is my hiera.yaml:
>>> > >> --
>>> > >>
>>> > >> :backends:
>>> > >>
>>> > >> - yaml
>>> > >> - eyaml
>>> > >> - :hierarchy:
>>> > >> - defaults
>>> > >> - "%{clientcert}"
>>> > >> - "%{environment}"
>>> > >> - global
>>> > >> - :yaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata
>>> > >> - :eyaml: :datadir: /etc/puppetlabs/puppet/modules/hieradata
>>> > >> - :pkcs7_private_key:
>>> > >> /etc/puppetlabs/puppet/secure/keys/private_key.pkcs7.pem
>>> > >> - :pkcs7_public_key:
>>> > >> /etc/puppetlabs/puppet/secure/keys/public_key.pkcs7.pem
>>> > >>
>>> > >> And my defaults.eyaml file:
>>> > >> --
>>> > >>
>>> > >> rootpwd: >
>>> > >> 
>>> ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQAwDQYJKoZIhvcNAQE
>>> > >> ...]
>>> > >> Any hints will be greatly appreciated.
>>> > >>
>>> > >> I am running Puppet Enterprise 3.1.0 on Ubuntu 12.04.
>>> > >>
>>> > >
>>> >
>>> > --
>>> > 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/qpia1_TR2dI/unsubscribe.
>>> > To unsubscribe from this group and all its topics, send an email
>>> > to puppet-users...@googlegroups.com .
>>> > To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/eed4dd1d-6fc0-4538-b1c5-1621f78ab509%40googlegroups.com
>>> .
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>>
>>>
>>
>>
>> -- 
>> *Werner Bahlke   | T: 503-438-9466 | Skype: 
>> wernerbahlke*
>>  
>>  
>

-- 
You received this message because 

Re: [Puppet Users] Puppet catalog transfer often gets truncated (Could not intern from pson: error)

2014-07-15 Thread Daniel
I am also getting this problem. Did running the puppet master 
within Apache/Passenger or nginx/Passenger help at all?

I was thinking it could be to do with a non ascii character making its way 
into my code somewhere as that seems to cause dodgy stuff but that's not 
it. I've seen lots of suggestions but I get the feeling it must be a bug 
with puppet.

Not able to view the ticket as it looks like projects.puppetlabs.com is 
down currently.

I am using opensource:

ruby-1.8.7.352-13.el6.x86_64
puppet-2.7.25-2.el6.noarch
puppet-server-2.7.25-2.el6.noarch

Dan



On Tuesday, 23 April 2013 16:31:06 UTC+1, Jeff B wrote:
>
>
>
> On Tuesday, April 23, 2013 9:38:34 AM UTC-4, jcbollinger wrote:
>>
>>
>>
>> On Monday, April 22, 2013 3:03:13 PM UTC-5, Matthew Burgess wrote:
>>>
>>> On Mon, Apr 22, 2013 at 4:56 PM, Jeff B  wrote:
>>>
 I've been hitting this issue for a long time. well over a year and I 
 guess it's time to start pushing it to try to find the root cause.  I've 
 seen this reported several times in the past but I've never seen a 
 resolution found for this exact problems.  There are other root causes for 
 pson errors that have been resolved, but not for the ones describing my 
 problem.

 What we're finding is that often times the catalog is getting chopped 
 off at some seemingly random point in the file.  If you run puppet agent 
 multiple times in a row each time it will cut off at always different 
 parts.

>>>
>>> Hi Jeff,
>>>
>>> At the risk of this looking like a "when all you have is a hammer, 
>>> everything looks like a nail" type response, whenever I've seen random 
>>> failures like this, it's because the puppetmaster can't cope with the load 
>>> being driven to it.  Are you running your puppetmaster behind a web server 
>>> such as Apache/Passenger or nginx/Passenger?  If not, and dependent on the 
>>> number of clients and their runinterval, you may be hitting a bottleneck 
>>> caused by Puppet's internal webserver's (Webrick's) single-threaded nature.
>>>
>>>
>> A fundamental characteristic of being single-threaded is that Puppet / 
>> webrick always finishes processing any current request before it starts 
>> work on the next. Therefore, if Puppet's responses are truncated when it 
>> has additional requests queued then that is not merely a loading issue -- 
>> it is a genuine and fairly serious bug.  It probably indicates that Puppet 
>> does not properly flush / close the response stream when it reaches the end 
>> of the response (or the like), though I cannot guess whether that would be 
>> a flaw in Puppet's own code or one in webrick.  If in Puppet itself, then 
>> it may manifest in other ways and in other contexts, too, so I urge you to 
>> file a ticket.
>>
>>
>> John
>>
>>
> Thanks John,
>
> Ticket has been created:  https://projects.puppetlabs.com/issues/20350  
>
> I'll be happy to help debug this problem as needed.
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f628c268-1927-40bf-89f4-e5999de98518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Use MCollective to execute test automation (long running job) on lab machines

2014-07-15 Thread Andrii Kalytiuk
Asked the same question 

 
on Puppet questions site.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9790ca96-7097-45ec-8330-ea8eeddf0901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] The combined use of Ubuntu and CentOS

2014-07-15 Thread jcbollinger


On Monday, July 14, 2014 2:27:22 PM UTC-5, Hunter Haugen wrote:
>
> Yep, totally possible. The puppet master daemon is platform-agnostic and 
> uses the information sent from the agent (via `facter`) to know how to 
> compile the catalog.
>


AND, the agent adapts to the tools provided by its host OS.

 

> So if your ubuntu agents check in, the master daemon makes ubuntu 
> catalogs. If your centos agents (including the master managing itself) 
> checks in, then it will have different facts and thus a different catalog.
>


Yes and no.  Most of the automation in this regard is in the agent, as a 
'provider' appropriate to the host OS is automatically chosen for each 
resource type represented in its catalog.  There are OS-specific details 
not covered by facts that nevertheless need to be addressed in the 
manifests and/or data from which the master compiles catalogs -- package 
names, for example.

 

>
> Modules are commonly written to handle the different package & service 
> names across platforms as well as different kinds of configuration defaults 
> (eg, 
> https://github.com/puppetlabs/puppetlabs-ntp/blob/master/manifests/params.pp#L42-L78)
>  
> and can be run from any master (even AIX masters serving windows agents if 
> a module is written to support windows :P).
>
>

Exactly.  So, yes, you can totally service Ubuntu, and OS X, and even 
Windows clients with a CentOS master -- and plenty of people do.  But it's 
not magic.  Puppet does as much as it can to ease the way, but you still 
need to be mindful of the details yourself.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5176c9a3-9f06-40dc-8bda-b5b27f322215%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How do I send notification to Puppet Master in an event of file change?

2014-07-15 Thread Martin Alfke
Hi Kevin,
On 15 Jul 2014, at 00:26, Kevin Aloysius  wrote:

> How do I monitor a file for a file change and send an [info] log to the 
> Puppet Master / Puppet Dashboard ? I tried audit but it doesn't really help 
> the case as Puppet does not explicitly send a Notification / Changed Log as 
> it comes under the category of unmanaged resource. Is there any other way to 
> achieve this. I am running Puppet Enterprise

I suggest to run puppet agent in noop mode.
Puppet agent will send a report to Enterprise Console in case that a file needs 
modification.
Nodes with outstanding changes will be shown with a blue label inside the 
Console.

hth,

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/17A890A1-8862-41E7-9049-38E78307B576%40gmail.com.
For more options, visit https://groups.google.com/d/optout.