Re: [Puppet Users] Run a build module on first logon for new puppet clients

2013-09-09 Thread Martin Alfke
Hi Karl,

you can achieve this by one of the following procedures:

1. by stage
- enable stages 
http://docs.puppetlabs.com/puppet/latest/reference/lang_run_stages.html
- put build class into an early stage
- put all other classes into main stage

Pro: does need one puppet run only.

2. by fact
- in initial class we manage a fact (/etc/facter/facts.d) and provide all 
required resources which are needed initially.
- in standard modules we check for fact availability.

Note: the fact does not get delivered via pluginsync.
Con: needs two puppet runs as minimum.

hth,

Martin


On Sep 9, 2013, at 1:37 AM, kdo  wrote:

> Hey All,
> 
> I have been wondering how it might be possible to run a specific build module 
> when a puppet client signs in for the first time after being built. So I 
> guess the puppet master would need to be run in auto sign in mode and then 
> have a specific build module applied, ideally just once. Anyone looked into 
> this before ?
> 
> this build module is used to configure a server from start to finish at build 
> time only and is the removed. this would remove an additional step in our 
> build process
> 
> 
> 
> 
> 
> -- 
> 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] Puppet calls the ENC twice for some nodes.

2013-09-09 Thread pierra mathieu
Hi everyone, 

I have an issue setting up Puppet with an ENC.
For some nodes, puppet calls my ENC twice with a 2 sec interval.

All my agents share the same configuration file. 


Considering this very basic ENC : 

#!/bin/bash
> nodeName=$1
> echo `date` $nodeName >> /tmp/encCalls
> echo "---
> classes:
>   testClass:"



Here is the content of /tmp/encCalls after a few run on two nodes.

Mon Sep  9 11:36:15 CEST 2013 : host1
> Mon Sep  9 11:36:17 CEST 2013 : host1
> Mon Sep  9 11:41:04 CEST 2013 : host2
> Mon Sep  9 11:42:04 CEST 2013 : host1
> Mon Sep  9 11:42:06 CEST 2013 : host1
> Mon Sep  9 11:45:13 CEST 2013 : host2



Anybody knows why two calls are made ?

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.


[Puppet Users] manage puppet modules, but not all of them

2013-09-09 Thread Jason Antman
We currently have one git repository for our modules/ directory, which 
is mostly homegrown, but includes a few community modules. I'm looking 
for a way to manage the installation and upgrade of community modules.


What we really want is something simple that can help us install and 
upgrade community modules:

* without managing our existing modules
* in one git repository (modules/)
* including Forge modules *and* arbitraty git/github repos

At the moment, I've been able to identify 2 real options:
1) puppet-librarian - this seems great, but (as far as I can tell) wants 
to remove everything in the modules/ directory and manage it all from 
the Puppetfile, which would require us to split our existing modules 
(some of which are just one class with one or two resources) into 
independent git repos and manage them all with librarian, which we don't 
want to do.
2) `puppet module` tool - this seems to do what we want, but AFAIK can 
only install from the Forge (not github or local git URLs) so we lose 
the ability to install non-forge modules, or to fork forge modules and 
install our fork until (hopefully) the changes are merged in upstream.


Are there any other options I've missed, or will this end up being some 
script that I cobble together myself?


Thanks for any advice/input
Jason Antman

--
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] clone system configuration with puppet

2013-09-09 Thread Marcus Schäfer
HI,

thanks I will take a look at the suggested projects

Regards,
Marcus

On Friday, September 6, 2013 5:36:15 PM UTC+2, Steven wrote:
>
> Found the other one. It is pysa
>
> Links for both:
> *Blueprint*
> https://github.com/devstructure/blueprint
> http://devstructure.com/blueprint/
>
> *Pysa*
> http://pypi.python.org/pypi/Pysa
> http://github.com/MadeiraCloud/pysa
>
> Steven
>
> --
> From: sne...@hotmail.com 
> To: puppet...@googlegroups.com 
> Subject: RE: [Puppet Users] clone system configuration with puppet
> Date: Fri, 6 Sep 2013 08:24:37 -0700
>
> Puppet only knows about what it is managing or auditing. So, it will 
> always be limited by what it is told to look at. While you might be able to 
> do something using the audit feature, I would not recommend it. As it will 
> never be complete for your purpose.
>
> I'd recommend looking at blueprint. There is also a newer tool, but I 
> can't remembered its name at the moment.
>
> Steven
>
>
> --
> Date: Fri, 6 Sep 2013 01:54:28 -0700
> From: marcus@gmail.com 
> To: puppet...@googlegroups.com 
> Subject: [Puppet Users] clone system configuration with puppet
>
> Hi,
>
> I'm new to puppet, read a bit about it and tried a few things out. It's 
> really a great piece of work.
> Thanks for doing all this. As part of my work I'm leading the opensource 
> kiwi project which is a
> plain appliance builder and one aspect of the project is also to help 
> people in migrating a currently
> running system into an appliance description which then allows to maintain 
> and build into different
> appliance types, e.g the way from bare metal into the virtual world, or 
> from one architecture into
> another.
>
> The migration code as it is right now handles the configuration part just 
> by creating copies of
> configuration files. It relies on config metadata of the rpm database, it 
> takes concepts of autoyast
> into place. But all this is a pretty humble approach has some room to fail 
> and also limits to specific
> distribution concepts. I was thinking it could be done better/more 
> generic. So my question is, is
> puppet able to provide information about the configuration of a system 
> which it did _not_ setup
> itself in the first place ?
>
> information like sshd configuration, apache, etc, etc... my first guess 
> would be it knows best
> about its own resources but not about services running on a system not 
> managed by puppet so
> far. Is that correct ?
>
> Thanks much
>
> Regards,
> Marcus
>
>  
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users...@googlegroups.com .
> To post to this group, send email to puppet...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users...@googlegroups.com .
> To post to this group, send email to puppet...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  

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

2013-09-09 Thread jcbollinger


On Monday, September 9, 2013 1:52:43 AM UTC-5, Stepan Seycek wrote:
>
> Hi John,
>
> thanks for your reply. Unfortunately that does not solve my actual 
> problem. I want to avoid maintaining multiple vhost entries inside one file.
>


My suggestion accomplishes that.  Following Puppet best practices and 
autoloader requirements, each vhost class would go into a separate file.

 

> Instead I want to be able to add a vhost by simply adding one file 
> dedicated to that vhost to a directory.
>


You didn't say the part before.

 

> This would allow me to easily integrate puppet with a tool that rolls out 
> whole application stacks including the vhosts.
>
>
It can be done -- with 'import', even -- but most of the options for such a 
setup are poor practice.  To suggest a good alternative, I would like to 
better understand your planned usage.  Will you be using Puppet in agent / 
master mode, or standalone mode?  Are you looking for one-time deployment, 
or continuing vhost management?  Will you ever have to support multiple 
servers with different vhosts?  With overlapping vhosts?  Do you need to 
provide for removing unwanted vhosts?  Would it be an unacceptable burden 
to run a second tool after the one that produces the vhost information, 
before it is ready for Puppet?


John

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


Re: [Puppet Users] Run a build module on first logon for new puppet clients

2013-09-09 Thread jcbollinger


On Monday, September 9, 2013 2:35:39 AM UTC-5, Martin Alfke wrote:
>
> Hi Karl, 
>
> you can achieve this by one of the following procedures: 
>
> 1. by stage 
> - enable stages 
> http://docs.puppetlabs.com/puppet/latest/reference/lang_run_stages.html 
> - put build class into an early stage 
> - put all other classes into main stage 
>
> Pro: does need one puppet run only. 
>
>

Con: does not accomplish the OP's objective.  He wants to apply a module 
only on the first Puppet run (or at least that's how I read him).  Using 
stages could cause the module to be applied before all the others, but 
would not prevent it from being applied on every run.

 

> 2. by fact 
> - in initial class we manage a fact (/etc/facter/facts.d) and provide all 
> required resources which are needed initially. 
> - in standard modules we check for fact availability. 
>
> Note: the fact does not get delivered via pluginsync. 
> Con: needs two puppet runs as minimum. 
>
>

I think two runs is exactly what the OP is looking for: the first run is 
different from all subsequent ones.  A fact-based approach can accomplish 
this, either with a full-fledged, plugin-synced custom fact or with a 
facts.d-based one.  The basic idea is that declaration of the 
system-initialization class is conditioned on some fact value, and 
application of that class modifies the system so that the fact value 
reported on subsequent runs is different (so that the condition for 
declaring the system-initialization class is no longer satisfied).


John

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


[Puppet Users] Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid

2013-09-09 Thread sandeep kumar


Hi All,

While I am running puppet agent I get the following error:

command : puppet agent --verbose Error: Could not prepare for execution: 
Could not create PID file: /var/run/pe-puppet/agent.pid

Checked under /var/run/pe-puppet, pid file is being created when the 
serrvice is started. Checked in the puppet.conf and the rundir is correctly 
mentioned. Nothing found under /var/log/pe-puppet/

Please let me know where else I can check for the error.

Thanks, Manchana

-- 
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] Resource ordering problem

2013-09-09 Thread Brian Lalor
I'm struggling once again with resource ordering with Puppet.

I'm using Puppet 3.2.4, v3.0.0 of the Puppetlabs RabbitMQ module and v0.7.5 of 
the Sensu module.  I'm trying to compose a system from these modules that runs 
the Sensu server, as well as the RabbitMQ server.  I have the following 
relationships defined:

Service['rabbitmq-server'] -> Service['sensu-client']
Service['rabbitmq-server'] -> Service['sensu-api']
Service['rabbitmq-server'] -> Service['sensu-dashboard']
Service['rabbitmq-server'] -> Service['sensu-server']

However I'm consistently finding that Puppet is attempting to start 
Service[sensu-api] before Service[rabbitmq-server]:

Notice: 
/Stage[main]/Sensu::Service::Server/Service[sensu-dashboard]/ensure: ensure 
changed 'stopped' to 'running'
Info: /Stage[main]/Sensu::Service::Server/Service[sensu-dashboard]: 
Unscheduling refresh on Service[sensu-dashboard]
Error: Could not start Service[sensu-api]: Execution of 
'/etc/init.d/sensu-api start' returned 1: 
Error: /Stage[main]/Sensu::Service::Server/Service[sensu-api]/ensure: 
change from stopped to running failed: Could not start Service[sensu-api]: 
Execution of '/etc/init.d/sensu-api start' returned 1: 
Notice: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]/ensure: 
ensure changed 'stopped' to 'running'
Info: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Unscheduling 
refresh on Service[rabbitmq-server]
Notice: /Stage[main]/Sensu::Service::Server/Service[sensu-server]/ensure: 
ensure changed 'stopped' to 'running'
Info: /Stage[main]/Sensu::Service::Server/Service[sensu-server]: 
Unscheduling refresh on Service[sensu-server]
Info: Class[Sensu::Service::Server]: Scheduling refresh of 
Class[Sensu::Service::Client]
Info: Class[Sensu::Service::Client]: Scheduling refresh of 
Service[sensu-client]
Notice: /Stage[main]/Sensu::Service::Client/Service[sensu-client]: 
Dependency Service[sensu-api] has failures: true
Warning: /Stage[main]/Sensu::Service::Client/Service[sensu-client]: 
Skipping because of failed dependencies
Notice: /Stage[main]/Sensu::Service::Client/Service[sensu-client]: 
Triggered 'refresh' from 1 events
Notice: /Stage[main]/Sensu/Anchor[sensu::end]: Dependency 
Service[sensu-api] has failures: true
Warning: /Stage[main]/Sensu/Anchor[sensu::end]: Skipping because of failed 
dependencies

I've taken this down to the lowest-level resource and it's still failing.  What 
am I doing wrong?

Thanks,
Brian

--
Brian Lalor
bla...@bravo5.org
http://github.com/blalor

-- 
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] Resource ordering problem

2013-09-09 Thread Brian Lalor
On Sep 9, 2013, at 10:02 AM, Brian Lalor  wrote:

> I'm struggling once again with resource ordering with Puppet.

*sigh* Looks like the 

if defined(Class['rabbitmq::service']) { … }

guard I've got around these relationships is wrong.  

It's gonna be that kind of week, isn't it? :-(

Sorry for the noise, everyone!

--
Brian Lalor
bla...@bravo5.org
http://github.com/blalor

-- 
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] Error on tried to used this module in development environment.

2013-09-09 Thread Eduardo Terzella
Good morning ,

I could audar to debug this problem ?

"puppet agent - test"


Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class pentaho for srvdev206.cia.stefanini.com on node 
srvdev206.cia.stefanini.com
/usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:185:in `is_http_200?'
/usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:100:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:197:in `find'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:243:in `retrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:242:in `retrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:67:in `retrieve_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:107:in 
`prepare_and_retrieve_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:159:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson


The same module , works in production environment ( inside the puppet ) , 
when I change the server to the development environment and use the same 
code , this error happens .

-- 
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] Odd behaviour trying to specify restart command for service on windows

2013-09-09 Thread Rob Reynolds
Try this

restart => 'c:/windows/system32/cmd.exe /c c:\Tomcat7\bin\RestartService.
bat'

cmd.exe may not know how to find items with a path that contains forward
slashes.


On Thu, Sep 5, 2013 at 12:50 PM, Adam Scarborough  wrote:

> Hi
>
> i'm having a strange issue and was wondering if anyone could help
>
> I have the following resource defined for a windows service:
>
>
>service{'Tomcat7':
> ensure => running,
> restart => 'c:/windows/system32/cmd.exe /c
> c:/Tomcat7/bin/RestartService.bat'
>}
>
> in this case both  'c:/windows/system32/cmd.exe and
> c:/Tomcat7/bin/RestartService.bat exist
>
> however when running something which notifies this service to restart i
> receive the following:
>
> Notice:
> /Stage[main]/Dep7selfedit/File[c:\tomcat7\webapps\esign.war]/ensure:
> defined content as '{md5}7b024320ab00c33d189a9fac6217bbea'
> Info: /Stage[main]/Dep7selfedit/File[c:\tomcat7\webapps\esign.war]:
> Scheduling refresh of Service[Tomcat7]
> Debug: /Stage[main]/Dep7selfedit/File[c:\tomcat7\webapps\esign.war]: The
> container Class[Dep7selfedit] will propagate my refresh event
> Debug: /Schedule[never]: Skipping device resources because running on a
> host
> Debug: /Schedule[weekly]: Skipping device resources because running on a
> host
> Debug: /Schedule[puppet]: Skipping device resources because running on a
> host
> Debug: Class[Dep7selfedit]: The container Stage[main] will propagate my
> refreshevent
> Debug: Service[Tomcat7](provider=windows): Service Tomcat7 is running
> Debug: Service[Tomcat7](provider=windows): Service Tomcat7 is running
> Debug: Executing 'c:/windows/system32/cmd.exe /c
> c:/Tomcat7/bin/RestartService.bat'
> Error: /Stage[main]/Dep7transcription/Service[Tomcat7]: Failed to call
> refresh:CreateProcess() failed: The system cannot find the file specified.
> Error: /Stage[main]/Dep7transcription/Service[Tomcat7]: CreateProcess()
> failed:The system cannot find the file specified.
>
> I am somewhat befuddled as to why this is. Any help would be much
> appreciated
>
> Thanks
>
> Adam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Rob Reynolds
Developer, Puppet Labs

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

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


Re: [Puppet Users] Re: Custom Function that uses powershell

2013-09-09 Thread Rob Reynolds
The next version of facter will bring in executable external facts (which
can be a powershell script) that would allow you to do the fact workaround.

Another thing you can do is set environment variables on the machine that
would contain user/pass and use those. And then there is also ENC



On Fri, Sep 6, 2013 at 7:36 AM, Alessandro Franceschi  wrote:

> Functions are executed on the PuppetMaster when compiling the catalog.
> I don't think you can.
> You may try some workaround calling a powershell command from a custom
> fact and use the fact value to manage your logic.
>
>
> On Thursday, September 5, 2013 6:32:21 PM UTC+2, carllindelof wrote:
>>
>> Hi All,
>>
>> Is there anyone who has written a custom function calling powershell that
>> returns a value?
>>
>> The case we are trying to use the puppet module *scheduled_task *and it
>> works really well!
>>
>> The problem is that we don't want to declare our password in the
>> declaration so we would like to set username and password with a task
>> performed after the task is registered.
>>
>> Everything works almost fine except for when we set the user and password
>> , the next runtime the scheduled_task resource will change back to system
>> since nothing is declared.
>>
>> So everything runs everytime puppet agent runs.
>>
>> We would like to a custom functions that checks if the scheduled_task is
>> created and runing under proper user. If that is the case we dont ned to
>> run *scheduled_task *resource.
>>
>>
>> So in pseudo code something like this:
>>
>> $result  = sheduledtaskexists("**MyMagicTask")
>>
>> unless $result
>>
>>
>>   scheduled_task { 'MyMagicTask':
>>   ensure=> present,
>>   enabled   => true,
>>   command   => 'd:\Scheduled_Tasks\MyMagicTas**k.bat',
>>   trigger   => {
>> schedule   => daily,
>> every  => 1,# Defaults to 1
>> start_date => '2011-08-31', # Defaults to 'today'
>> start_time => '03:00',  # Must be specified
>>   }
>> }
>>
>>
>> end
>>
>>
>>
>>
>> module Puppet::Parser::Functions
>>   newfunction(:**sheduledtaskexists, :type => :rvalue) do |args|
>>
>> argument =args[0].to_s() #  "MyMagicTask"
>>
>> cmd = 'C:\Windows\System32\**WindowsPowerShell\v1.0\**powershell.exe 
>> -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command . 
>> d:\\tools\\check_task_exist.**ps1; Task-Exists argument' #should be repla
>>
>> value = %x[ #{cmd} ].to_s().chomp
>> result = value
>>   end
>> end
>>
>>
>>
>> Powershell snippet... not proper code..
>>
>>
>> function Task-Exists([string]$taskname)
>> {
>>
>>  [Boolean]$isFound = $false
>>  [xml]$tasks =  schtasks  /query /TN $taskname /XML
>>
>>  if($tasks)
>>
>> {
>>  $isFound = $true
>>
>> }
>>
>>$isFound
>>
>> }
>>
>>
>> Has someone done something like 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.
>



-- 
Rob Reynolds
Developer, Puppet Labs

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

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


Re: [Puppet Users] agent will not run

2013-09-09 Thread Werner Flamme
jcbollinger [09.09.2013 16:48]:
> 
> 
> On Friday, September 6, 2013 8:44:44 AM UTC-5, Werner Flamme wrote:
>>
>> Werner Flamme [28.08.2013 13:18]: 
>>> Hi, 
>>>
>>> I wonder why the puppet agent on the server itself will not run: 
>>>
>>> ---snip--- 
>>> # puppet agent --test 
>>> Error: Could not run Puppet configuration client: Puppet::Node does not 
>>> respond to from_s; can not intern instances from text/plain 
>>> Error: Could not run: can't convert Puppet::Util::Log into Integer 
>>> ---pins--- 

[...]

>>
>> I'm still none wiser. Another client (SLES 11 SP2) runs fine with this 
>> server, and the same modules are used. So it must be a permissions thing 
>> on the client, but where? 
>>
>> BTW, all boxes now run puppet-3.2.4-1.1 from the 
>> systemsmanagement:puppet repos on openSUSE's build system. 
>>
>>
> 
> My first guess would be that you have multiple versions of Puppet 
> installed, and somehow  the agent you are trying to run is getting the Ruby 
> libraries for the other version.  Perhaps something like that could happen 
> if you install one version via RPM and another via gem, or worse, directly 
> from source.

Hi John,

thanks for your input.

I do not remember installing Ruby or any gem from other sources than via
rpm. In /usr/lib64/ruby, I have only 1.9.1 subdirectories in the
respective places, and their timestamps are so close together that I can
only assume a "mass install" by rpm.

But I'm staring like an idiot at my screen now: it works.

Some 5 hours ago I was still stuck with the error, and now it works!?
OK, there is an error (as it is a test client), but this is the first
time this client did not complain about the errors I gave at the start.

I'm scratching my head, but nevertheless: thank you!

Regards,
Werner

-- 

-- 
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] Error 400 on SERVER: Could not find class pentaho for server.test.com

2013-09-09 Thread Eduardo Terzella
Good morning ,

I could help to debug this problem ?

"puppet agent - test"


Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class pentaho for s 
erver.test.com
/usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:185:in `is_http_200?'
/usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:100:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:197:in `find'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:243:in `retrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:242:in `retrieve_new_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:67:in `retrieve_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:107:in 
`prepare_and_retrieve_catalog'
/usr/lib/ruby/vendor_ruby/puppet/configurer.rb:159:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime'
/usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'
/usr/bin/puppet:4
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson


The same module , works in production environment ( inside the puppet ) , 
when I change the server to the development environment and use the same 
code , this error happens .

-- 
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] Solaris useradd uses /export/home and not /home

2013-09-09 Thread jcbollinger


On Friday, September 6, 2013 8:07:24 AM UTC-5, Andreas Dvorak wrote:
>
> Hi Dick,
>
> thank you for the help, but it did not change anythink. The error mesage 
> stays exactly the same.
>
> Puppet ignores the setting of the home variable.
>
> Now I have created the missing home directory in /export and the user is 
> created, but in the wrong directory.
>
>

Something is very screwy here.  Is your actual User resource is exactly as 
you present?  In particular, is the value of the 'home' parameter to your 
misbehaving User resource exactly as you present?  Because the simplest 
explanation would be that the base directory is really expressed in terms 
of a variable (e.g. "$home/$username"), and the base directory part has a 
different value than you expect.

If the exact declaration you presented in fact does produce the result you 
reported, then either the User type or the selected User provider is 
misbehaving.  The default provider for Solaris is normally "user_role_add", 
but if you have installed a custom User provider then is might be chosen 
instead.  If you run the agent with --debug logging enabled then it should 
warn you about any such conflict.  Also, you can ensure that the agent uses 
user_role_add on solaris clients by adding this to your user declaration:

  provider => $::osfamily ? { 'solaris' => 'user_role_add', default => 
undef }

If adding that changes the behavior, then you really ought to find the 
other User provider that was previously being chosen, and figure out what 
its purpose is supposed to be, as you would be circumventing it by using 
user_role_add.

You might also want to check the catalog delivered to the client.  It's in 
YAML format, so you can read it with ordinary text tools.  What you're 
looking for is whether the catalog specifies '/home/user1' or 
'/export/home/user1'.  If the former, then the problem resides on the 
client (and thus probably in the provider); if the latter, then it resides 
on the master, in the User type 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 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] agent will not run

2013-09-09 Thread jcbollinger


On Friday, September 6, 2013 8:44:44 AM UTC-5, Werner Flamme wrote:
>
> Werner Flamme [28.08.2013 13:18]: 
> > Hi, 
> > 
> > I wonder why the puppet agent on the server itself will not run: 
> > 
> > ---snip--- 
> > # puppet agent --test 
> > Error: Could not run Puppet configuration client: Puppet::Node does not 
> > respond to from_s; can not intern instances from text/plain 
> > Error: Could not run: can't convert Puppet::Util::Log into Integer 
> > ---pins--- 
> > 
> > whereas the client on a test box tells me: 
> > ---snip--- 
> > # puppet agent --test 
> > Info: Retrieving plugin 
> > Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/pe_version.rb 
> > Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/root_home.rb 
> > Info: Loading facts in 
> /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb 
> > Info: Loading facts in 
> > /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb 
> > connect: No such file or directory 
> > Please make sure that the zfs-fuse daemon is running. 
> > internal error: failed to initialize ZFS library 
> > connect: No such file or directory 
> > Please make sure that the zfs-fuse daemon is running. 
> > internal error: failed to initialize ZFS library 
> > Info: Caching catalog for rz36test2.intranet.ufz.de 
> > Info: Applying configuration version '1377687070' 
> > Notice: Finished catalog run in 0.20 seconds 
> > ---pins--- 
> > 
> > On both machines (server: SLES 11 SP2; test box: openSUSE 12.3) I have 
> > the same puppet packge installed, puppet-3.2.3-1.1 from the 
> > systemsmanagement:puppet repository of openSUSE build system. 
> > 
> > I tried to find error messages via google an ixquick, but nothing was 
> > found. Where can I look for the error, and what do I have to look for? 
> > As far as I con see, my configuration is d'accord with 
> > . 
> > 
> > Commands like 
> > 
> > # puppet agent --configprint modulepath 
> > 
> /etc/puppet/test1/modules:/etc/puppet/modules:/usr/share/config/test1/modules 
>
> > # puppet agent --environment test2 --configprint modulepath 
> > 
> /etc/puppet/test2/modules:/etc/puppet/modules:/usr/share/config/test2/modules 
>
> > 
> > work, so I am sure puppet reads its environment "test1" from puppet.conf 
> > correctly. 
> > 
> > Can someone please point me in the right direction? 
>
> I'm still none wiser. Another client (SLES 11 SP2) runs fine with this 
> server, and the same modules are used. So it must be a permissions thing 
> on the client, but where? 
>
> BTW, all boxes now run puppet-3.2.4-1.1 from the 
> systemsmanagement:puppet repos on openSUSE's build system. 
>
>

My first guess would be that you have multiple versions of Puppet 
installed, and somehow  the agent you are trying to run is getting the Ruby 
libraries for the other version.  Perhaps something like that could happen 
if you install one version via RPM and another via gem, or worse, directly 
from source.


John

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


[Puppet Users] Use of defined()

2013-09-09 Thread Brian Lalor
As my previous email this morning probably indicated, I'm struggling with the 
use of the defined( ) function.  The documentation says its operation is 
parse-order dependent; I'm trying to figure out how it's usable at all.  Since 
resource order with Puppet is nondeterministic (without explicitly using 
chaining arrows or before/after), how can I reliably test for the presence of a 
resource, like a package?  I see lots of instances of 

if ! defined(Package['some-package']) { … }

in other peoples' code.  Maybe I'm not understanding what's meant by "parse 
order", however.  Could someone explain?

Thanks,
Brian

--
Brian Lalor
bla...@bravo5.org
http://github.com/blalor

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


[Puppet Users] Puppet calls the ENC twice for some nodes.

2013-09-09 Thread Steven VanDevender
pierra mathieu writes:
 > Hi everyone, 
 > 
 > I have an issue setting up Puppet with an ENC.
 > For some nodes, puppet calls my ENC twice with a 2 sec interval.

Why is that a problem?  Your ENC should always return the same data for
the same node, and it should be efficient enough that it can be called
for every node in your system (even twice).

-- 
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: Importing declarations into node/class scope

2013-09-09 Thread Stepan Seycek

Hi John,

Am 09.09.2013 15:39, schrieb jcbollinger:



On Monday, September 9, 2013 1:52:43 AM UTC-5, Stepan Seycek wrote:

Hi John,

thanks for your reply. Unfortunately that does not solve my actual
problem. I want to avoid maintaining multiple vhost entries inside
one file.



My suggestion accomplishes that.  Following Puppet best practices and 
autoloader requirements, each vhost class would go into a separate file.


Instead I want to be able to add a vhost by simply adding one file
dedicated to that vhost to a directory.



You didn't say the part before.

This would allow me to easily integrate puppet with a tool that
rolls out whole application stacks including the vhosts.


It can be done -- with 'import', even -- but most of the options for 
such a setup are poor practice.  To suggest a good alternative, I 
would like to better understand your planned usage.  Will you be using 
Puppet in agent / master mode, or standalone mode?  Are you looking 
for one-time deployment, or continuing vhost management?  Will you 
ever have to support multiple servers with different vhosts?  With 
overlapping vhosts?  Do you need to provide for removing unwanted 
vhosts? Would it be an unacceptable burden to run a second tool after 
the one that produces the vhost information, before it is ready for 
Puppet?




Puppet runs in master/agent mode.
Puppet shall be used for continuous vhost management.
There will be multiple servers providing reverse proxy services with 
apache httpd vhosts (different vhosts on different servers).
Removal of vhosts is definitely a requirement for the undeployment of an 
application stack.

An additional tool processing the configuration for puppet is no problem.

I know I could maintain the information about active vhosts in my 
roll-out tool and when submitting to puppet generate a class file that 
would contain all active vhost declarations and would declare removals 
for those that have been active before and are not among the active ones 
any more. However, as mentioned before, I would prefer to generate a 
file for every to-be-added vhost and every to-be-removed vhost.


Regards,
Stepan



John

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

To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


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


[Puppet Users] Re: Puppet Forge Happenings

2013-09-09 Thread octomeow
How do I create forge server for internal modules?  Due to security 
concerns, we are limited in
what we can public back to the community, but would like to use the forge 
format vs librarian.
thanks

On Tuesday, October 2, 2012 7:35:34 PM UTC-7, Ryan Coleman wrote:
>
> Hello, 
>
> If you weren't at PuppetConf or didn't catch my talk, here's a quick 
> recap. I'm product owner for the Puppet Forge team which formed in 
> July with 2 awesome engineers and an equally awesome designer. We're a 
> team dedicated to the Forge and while ramping up, we've shipped three 
> small improvements to the Forge that we hope you enjoy. 
>
> * Two lists were added to the homepage, highlighting recently active 
> modules and contributors 
> * An authors Gravatar is now displayed on each module page. 
> * Today, the Forge will now retrieve information about GitHub issues 
> and pull requests for a module for display on a module page. This has 
> been automatically enabled for any module that lists GitHub as its 
> 'Project Issue Tracker URL'. 
>
> The team is just getting started. In the mean-time, we've been making 
> improvements to our back-end services, user-testing new feature ideas 
> and getting ready for the next wave of functionality. Our next 
> features will focus on these two areas. A) Making it easy for you to 
> contribute your module & B) Improve the information you have to make a 
> decision about which module to use. 
>
> As we develop and test ideas to address these goals, we want your 
> feedback! 
>
> Feel free to file bugs, features --anything really-- to our Redmine 
> project: https://projects.puppetlabs.com/projects/module-site/issues 
> Aside from that and this user list, you may always email me directly 
> -- ry...@puppetlabs.com  -- or find me on #puppet as 
> ryancoleman. I'm 
> always connected via ZNC so if you don't get an immediate response in 
> IRC, know that I'll see your message and reply if I can. 
>
>
> Finally, if you haven't tried out the Forge in a while, please give it 
> another go. http://forge.puppetlabs.com -- Each day new content is 
> added or updated and there's some truly awesome stuff amongst the 500+ 
> Forge modules. There's also a blog-post series showcasing a new one 
> each week. links.puppetlabs.com/motw 
>
> Thanks for your time and for being an awesome community! 
>
> --Ryan 
>

-- 
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] Ordering and templates question/issue

2013-09-09 Thread sjr
Hi,

I've been doing some tests with some internal methods just to mess a little 
and learn a bit about puppet internals but found myself in a situation 
which I don't really understand and I was hoping someone around could help 
me to get it.

I have a test module with the following init.pp:

class test1 
{   

   

  file 
{'/tmp/test1':  



content => 
template('test1/test1.erb'),



  
}   

 



   

  Test1::Print <| |> -> 
File['/tmp/test1']  

   

}

The define test1::print looks like:

define test1::print 
(   

   

  
$message

 

) 
{   

 

  notify{$message: 
}   



}

So nothing really special, then in the template I try to catch all the 
resources in the catalog with "scope.catalog.resources" method, nothing I 
came up with by myself I saw it in a module and thought it was a neat trick 
and wanted to try it and learn what else I could do with this kind of stuff.

The problem I'm having is that the template seems to be "compiled" before 
all the resources are in the catalog as the file only contains the 
following list of resources:

Stage[main]
Class[Settings]
Class[main]
Node[default]
Class[Test1]

In puppet's output, the relationships seem to be well defined but feels 
like puppet is somehow applying (catching?) the template even before 
creating the actual file.

The template has the following content:

<% @test = scope.catalog.resources.select { |r| r.type } -%>
<% @test.each do |t| -%>
<%= t %>
<% end %>

Am I missing anything? I expected to see in the file the defined type 
test1::print...

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] manage puppet modules, but not all of them

2013-09-09 Thread Denmat
I believe the librarian can manage a specified directory. You can add that 
directory to your module path in your puppet.conf. 

That help?
On 09/09/2013, at 22:02, Jason Antman  wrote:

> We currently have one git repository for our modules/ directory, which is 
> mostly homegrown, but includes a few community modules. I'm looking for a way 
> to manage the installation and upgrade of community modules.
> 
> What we really want is something simple that can help us install and upgrade 
> community modules:
> * without managing our existing modules
> * in one git repository (modules/)
> * including Forge modules *and* arbitraty git/github repos
> 
> At the moment, I've been able to identify 2 real options:
> 1) puppet-librarian - this seems great, but (as far as I can tell) wants to 
> remove everything in the modules/ directory and manage it all from the 
> Puppetfile, which would require us to split our existing modules (some of 
> which are just one class with one or two resources) into independent git 
> repos and manage them all with librarian, which we don't want to do.
> 2) `puppet module` tool - this seems to do what we want, but AFAIK can only 
> install from the Forge (not github or local git URLs) so we lose the ability 
> to install non-forge modules, or to fork forge modules and install our fork 
> until (hopefully) the changes are merged in upstream.
> 
> Are there any other options I've missed, or will this end up being some 
> script that I cobble together myself?
> 
> Thanks for any advice/input
> Jason Antman
> 
> -- 
> 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] Error on tried to used this module in development environment.

2013-09-09 Thread Denmat

Is pentaho in a different module path on the two environments? Is the code 
exactly the same or does it contain extra code for the environments that 
doesn't compile?

On 10/09/2013, at 0:14, Eduardo Terzella  wrote:

> Error 400 on SERVER: Could not find class pentaho for 
> srvdev206.cia.stefanini.com on node srvdev206.cia.stefanini.com

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


Re: [Puppet Users] puppet agent modules/ manual pull

2013-09-09 Thread Rich Burroughs
For #1: Puppet is very good at managing cron jobs, in fact there's a cron
resource type that makes that very easy:

http://docs.puppetlabs.com/references/latest/type.html#cron

I'm not sure if there's an easy way to do #2. You could maybe run a puppet
apply on that manifest out of cron if you have it on all the nodes, but
then you have to deal with getting the code installed on all the hosts,
keeping it up to date, etc.

Honestly, I think you're making this a lot harder than it needs to be. Just
run the agent. It shouldn't cause a big performance issue, especially when
you only have a few simple modules. The agent runs by default every 30
minutes, maybe that's really often enough to make your check? You could set
it to run every 5 minutes too.

You may find as you go on that there are things you'll want puppet to do
much more often than once a day. Like managing user accounts, for example
-- you're maybe not going to want to wait up to a day for a new account to
show up on the hosts.


Rich



On Fri, Sep 6, 2013 at 10:46 AM, Tony Caffe  wrote:

> Hi,
>
>  I have puppet running just for a group of 5 servers. I am planning for
> increase and thus why I am starting now with puppet.
>
> I have only one github puppet module, puppet-timezone, as default for all
> nodes and is currently the only module even set up. This is key for our
> scripts to run.
>
> cat site.pp
>
>
>> class base {
>> class { 'timezone':
>> timezone => 'PST8PDT',
>> ensure => present,
>>  autoupgrade => true,
>> }
>> }
>> node default {
>> include base
>> }
>
>
> Now I want to create 2 groups, one called cacher and other procacher which
> will contain about 4 or so nodes each. They are identical servers in each
> group.
>
> Now I use this on each node install of puppet:
>
> crontab -l -u root
>
>> # Puppet agent check-in to save resources:
>> 0 1 * * * puppet agent --test --onetime
>
>
> I dont need them to check timezone sync all the time and I can utilize
> system resourses by leaving puppet off only to run cron 1 time per day.
> These are small machines and thus dont need puppet agent going all the time.
>
> Now I want to set up a custom module that will edit a users crontab and
> make sure the two tasks are uncommented out, but this I want to check every
> 5 min.
>
> crontab -u user -l
>
>> # ORDERS
>> */5 * * * * nice /home/user/other-script.php
>> "/home/user/other-script.log" >> /home/user/other-script.log
>> # BATCH
>> */5 * * * * nice /home/user/script.php "/home/user/script.log" >>
>> /home/user/script.log
>
>
> So my question/ help needed is 2 parts.
>
> *1st.)* What is the simplest way to create a custom module to check this
> is exactly as is every 5 min, but when I want to it will comment out those
> two scripts and make sure they stay that way till I want them back on?
>
> *2nd.)* (Not as important but would be nice) Is it possible to run this
> module check in crontab -u root every 5 min separate from the default once
> a day check for any other config options/modules I will use in the future,
> including puppet-timezone which is currently only one?
>
> Thanks in advance.
>
> Tony
>
> --
> 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] Announce: Facter 1.7.3 Available

2013-09-09 Thread Matthaus Owens
Facter 1.7.3 is a bugfix release in the 1.7 series.

To see a list of the issues addressed by this release, check out the
1.7.3 version in our issue tracker at:
https://projects.puppetlabs.com/versions/414

Downloads are available at:
 * Source: https://downloads.puppetlabs.com/facter/facter-1.7.3.tar.gz

RPMs are available at https://yum.puppetlabs.com/el or /fedora

Rubygem available at http://rubygems.org/gems/facter

Debs are available at https://apt.puppetlabs.com

Mac package is available at
https://downloads.puppetlabs.com/mac/facter-1.7.3.dmg

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.7.3:
 http://projects.puppetlabs.com/projects/facter/

=
## Facter 1.7.3 Release Notes  ##
=

For the full detail of closed issues specific to 1.7.3 see [this list
in Redmine](http://projects.puppetlabs.com/versions/414), containing
no new features, and 10 bugs closed, the majority for Windows.

Windows Executable External Facts (#22077)

Facter on Windows now supports generating external facts from
executables (.exe, .com, .bat, .ps1). Text
based external facts (.txt) have been supported since 1.7.0. See
http://docs.puppetlabs.com/guides/custom_facts.html#executable-facts-windows
for more information.

Windows IP related Facts (#12116, #16665, #16668, #21518)

Facter on Windows used to gather IP related facts using `netsh`, which
did not work reliably on 2003,
due to a dependency on the Routing and Remote Access service, nor did
it work on non EN_US systems.
Version 1.7.3 has been updated to use WMI, which resolves these
issues. It also adds the `ipaddress6`
fact on systems where this is available.

Fedora 19 (#21762)

Facter packages are now available for Fedora 19.


* 12116: Windows domain and fqdn facts error when there is no domain.
* 16665: [windows] wrong ipaddress with locale != en
* 16668: [windows] ipaddress fact reports hostname
* 20989: Facter 1.7.1 on 32 bit windows reports architecture fact as
"i1586", should be "x86"
* 21518: "interface" fact not available on windows 2003
* 21533: Facter prints errors to stderr on precise and f18
* 21762: Update facter to support F19
* 22064: Potential Local Escalation issue with Facts.d folder for
executable facts on Windows
* 22077: External Facts Support On Windows
* 22163: Remove hardcoded hostname dependencies from facter

==
## Facter 1.7.3 Changelog  ##
==

Adrien Thebo (2):
  d85a4c1 (refactor) Simplify ipaddress fact specs
  56ce53a (maint) Stub extraneous facts when testing ifconfig

Clément Demonchy (1):
  32fd13a ip address fact that return full ifconfig output

Elias Probst (1):
  d49f646 (#21533) Convert network data to string before access

Josh Cooper (12):
  9be738f (#21533) Verify facter doesn't write to stderr
  995232e Maint: Don't load facts twice during specs
  0ddf001 (#16668) Use WMI to collect macaddress fact
  c3199c7 (#16665) Remove references to netsh
  2ac6cc1 Maint: Simplify how interfaces are enumerated
  9f18629 (#16668) Support IPv6 adapter binding order
  abf0d08 Maint: Update yardocs
  fb3bd3b maint: adding lib to spec path in spec helper
  3ade301 (#16668) Backport WMI changes to per-interface facts
  c128221 Maint: Don't output "No facts loaded from" during tests
  4e12130 Maint: Clear memory facts now that they are loaded earlier
  5a730af (#12116) Don't break on the first interface

Josh Partlow (3):
  6031275 (maint) Fix mocha expectations crashing facter_spec
  ad902bd (maint) Rakefile loads all the libraries it can.
  65577a4 (maint) Update README with a little bit of spec info.

Matthaus Owens (6):
  9f5bec1 (maint) Clean up install.rb dependencies
  9d04cf5 (maint) Remove openssl dependencies from debian/control file
  3979271 (packaging) Update changelog template with currently
supported debian/ubuntu dists.
  53eeb2a (packaging) Remove createpackage.sh from facter
  a1842d0 (packaging) Remove PackageInfo.plist, it is no longer
used by packaging.
  e7a26cf (packaging) Update FACTERVERSION to 1.7.3

Melissa (3):
  18522b4 (Bug #21762) Update facter to support F19
  77de566 (Bug #22163) remove hardcoded hostname dependencies
  9e79d7c (packaging) Update FACTERVERSION to 1.7.3-rc1

Rob Reynolds (14):
  663c3d3 Adding a windows fact for i686 to architecture specs
  0cb1ff1 (#20989) x86 windows hardware model show i686 not i1586
  11ee819 (Maint) Ignore Gemfile.local
  0a8c231 (#16668) Use WMI to collect IPv4 address
  8ab8b98 (#16668) Use WMI to collect netmask fact
  66d8c80 (#16668) Use WMI to collect IPv6 address
  672efc5 (#21518) Use WMI to collect per-interface facts
  8fc6bd5 (#16668) added windows network spec helper
  47bfb4a (#16668) Only consider NICs that have a binding entry
  aaebc4e (#16668) Ipv6 remove warning
  e056b44 (#21

[Puppet Users] Re: Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid

2013-09-09 Thread Rahul Khengare
Hi Manchana,
   can you check the *rundir *option in  */etc/puppetlabs/puppet/puppet.conf
* file as,
.
*rundir = /var/run/pe-puppet *


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


On Monday, September 9, 2013 6:53:53 PM UTC+5:30, sandeep kumar wrote:
>
> Hi All,
>
> While I am running puppet agent I get the following error:
>
> command : puppet agent --verbose Error: Could not prepare for execution: 
> Could not create PID file: /var/run/pe-puppet/agent.pid
>
> Checked under /var/run/pe-puppet, pid file is being created when the 
> serrvice is started. Checked in the puppet.conf and the rundir is correctly 
> mentioned. Nothing found under /var/log/pe-puppet/
>
> Please let me know where else I can check for the error.
>
> Thanks, Manchana
>

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