[Puppet Users] Re: Installing MSI failed with errror: The network name cannot be found.
Hello Josh Here the output from puppet agent --test --debug --trace: ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-mingw32] C:\Program Files (x86)\Puppet Labs\Puppet\binpuppet agent --test --debug --trace debug: Failed to load library 'syslog' for feature 'syslog' debug: Failed to load library 'selinux' for feature 'selinux' debug: Puppet::Type::File::ProviderPosix: feature posix is missing debug: Failed to load library 'ldap' for feature 'ldap' debug: Failed to load library 'shadow' for feature 'libshadow' debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/resources.txt]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/run]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/graphs]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/webtest02.infra.be.ch.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_report.yaml]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/clientbucket]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/client_yaml]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/classes.txt]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/webtest02.infra.be.ch.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/webtest02.infra.be.ch.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/log]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/state.yaml]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/facts]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/client_data]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/ca.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: Finishing transaction 12916 debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/webtest02.infra.be.ch.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/webtest02.infra.be.ch.pem]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/facts]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug: /File[C:/ProgramData/PuppetLabs/puppet/var/run]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var] debug:
Re: [Puppet Users] Puppet, Yum, Cassandra, openjdk and --nodeps
This is rather unfortunate. The only way that I can think of is to change the deb/rpm package and serve that on your own. We are using cassandra on some deployment too but force JAVA_HOME explicitly in configuration files to the oracle jdk -- Nikola On Wed, Jul 24, 2013 at 02:29:44PM -0700, Paul Pham wrote: Hello, puppet n00b here. Trying to install cassandra via puppet. Works great, only caveat is cassandra (dsc12 package) lists openjdk as a dependency. Ironically enough, the datastax guys themselves recommend using Oracle JRE instead of openjdk, and there is even a bug https://bugzilla.redhat.com/show_bug.cgi?id=907485that prevents cassandra from starting if it's using openjdk. Anyway, I fixed it by adding an exec to my puppet-java module that sets the Oracle JRE runtime as the defaults via alternatives, and it works fine. However, I still end up with two different java runtimes installed which I find to be a bit unclean. The root of the problem to me, though, is that by having puppet install dsc12, I lose visibility into what all those dependencies were that got installed along with it (I didn't realize openjdk was even installing until I started investigating why cassandra wasn't starting). So what I'd prefer to do is add each individual package dependency into my cassandra module itself, thereby explicitly installing only what I intend to install, and nothing else. The only way this works, though, is if I can somehow pass the --nodeps option into yum during puppet apply time. Otherwise, regardless of whether I already installed Oracle JRE, using yum to install dsc12 will automatically install openjdk. How have you guys handled scenarios like this? I tried searching through the topics here for yum nodeps but it seems people found different ways of solving their individual problems rather than sending flags to the yum provider itself. I also noticed this puppet feature requesthttps://projects.puppetlabs.com/issues/4976which unfortunately has remained open(?) for 3 years. I've also seen people suggest that nodeps should never be used with yum since the purpose of yum is to handle dependencies... but we also like some of the other features of yum, like being able to pull packages down by name automatically from our yum repo (which we manage in-house). Anyway, any insights would be great! Thanks, Paul -- 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] Puppet Nagios resources
You can set Nagios_host { target = /etc/nagios/conf.d/${::fqdn}.cfg, } somewhere in site.pp file; just make sure it is in the global scope. This is just defining a default parameter for the resource. Note that this is a bad practice as everything global -- Nikola On Mon, Jul 22, 2013 at 03:08:49PM +0100, Jonathan Gazeley wrote: Hi all, We've been using Puppet to write out our Nagios configs for ages. I think I understand it pretty well. Recently we've had reason to set 'target' on all Nagios resources, based on the fqdn of the monitored host. However I don't want to have to set 'target' by hand on all Nagios resources (nor remember to set it on all future ones). So my question is: what's the easiest way to bulk-set the 'target' parameter according to the fqdn? So far I tried setting it on the Nagios server, which didn't work because $::fqdn is always the name of the Nagios server, not the monitored host Nagios_host | | { notify = Service['nagios'], target = /etc/nagios/conf.d/${::fqdn}.cfg, } I also tried including this on the monitored host, which didn't work because it attempts to realise all Nagios_host resources on the monitored host, not the Nagios server. Nagios_host | | { target = /etc/nagios/conf.d/${::fqdn}.cfg, } Is there an easy way to easily making all nagios_* resources have a fqdn-specific target? Thanks, Jonathan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Decomission node process (puppet / puppetdb / dashboard)
Great ! Thank you John... If I understand correctly, the node:del action will delete the node from dashboard database, while the reports:prune:orphaned will delete reports inventory files on the server. Does anyone see other useful actions to launch while decomissioning a node ? Best regards Yannig On Fri, Jul 26, 2013 at 2:47 AM, John Warburton jwarbur...@gmail.comwrote: On 25 July 2013 22:54, yannig rousseau yrouss...@keremma.net wrote: Do you know if it's possible to lauch it from a script (maybe a sql request ?) rake --silent node:del name=deleteme RAILS_ENV=production I also run a job each day to tidy up the database: # Purged nodes leave behind orphaned records: # http://docs.puppetlabs.com/pe/2.0/welcome_known_issues.html#consoles-reportsprune-task-leaves-orphaned-data # http://projects.puppetlabs.com/issues/6717 rake --silent RAILS_ENV=production reports:prune:orphaned $LOG 21 # Recover/pack space from deletions with table optimization # http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html DATABASE=`grep database: /local/puppet/dashboard/dashboard/config/database.yml | awk '{print $2}'` USER=`grep username: /local/puppet/dashboard/dashboard/config/database.yml | awk '{print $2}'` PASSWORD=`grep password: /local/puppet/dashboard/dashboard/config/database.yml | awk '{print $2}'` mysqlcheck -u $USER --password=$PASSWORD --optimize --databases $DATABASE $LOG 21 John -- 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/ZsjSJJWxeHk/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: No reports in foreman
My problem is solved. I had to add the hostname with domain on the Foreman web gui More Settings Auth trusted_puppetmaster_hosts And the file foreman.rb needs to be put in /usr/lib/ruby/site_ruby/1.8/puppet/reports thank you Andreas Am Donnerstag, 25. Juli 2013 19:15:37 UTC+2 schrieb Larry Long: I have my foreman running over Passenger, but if you are using the default webrick, you need to specify the port. The default is 3000. On Thursday, July 25, 2013 8:04:47 AM UTC-4, Andreas Dvorak wrote: Dear all I am trying to set up reports in foreman, but foreman tells me to configure it. What am I doing wrong? I have on the puppet master: /var/lib/puppet/reports/foreman.rb with $foreman_url=http://rh6-puppet-master Do I need the port? /etc/puppet/puppet.conf with in [main] reports = log, foreman I restarted the service service puppetmaster restart in /var/log/messages I find: No report named 'foreman' On the puppet client I added the line report = true to the [agent] section in the /etc/puppet/config file. Best regards Andreas -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To 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] Putting Puppet to work
Interested in getting suggestions to improve this tutorial meant for newbies: http://smoothops.wordpress.com/2013/07/26/putting-puppet-to-work/ Thomas -- 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] Deploying SOGo with Puppet
Wondering if any SOGo (a free, scalable groupware server) admins/users out there have successfully installed and configured SOGo with Puppet; or, whether the folks that have tried would recommend against it. -Pablo vDevices, LLC 1 Parker Place, Suite 303 Janesville, WI 53545 (608) 305-4446 vDevices.com http://vdevices.com/ | Providing Hosted IT Solutions to Lawyers Other Mobile Professionals -- PRIVILEGE CONFIDENTIALITY NOTICE: This electronic message is intended only for the named recipient(s). It may contain privileged and confidential information and, therefore, should not be disclosed to third parties without our express permission. If you have received this electronic mail in error, any review, dissemination, distribution, electronic storage, transmission or copying of is strictly prohibited. Please notify the sender immediately and purge the electronic message from your system. Thank you. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Not collecting exported resources without storeconfigs
Well, it seems puppet config print is useless as it is incorrect with most values it shows. I know storeconfigs are up and running and I think its going to puppetdb. I am still having issues with my mod. How do you know? The previous error you posted Not collecting exported resources without storeconfigs would lead me to believe its an error/misconfiguration somewhere in puppet, not PuppetDB - normally it means you haven't switched on storeconfigs in your puppet.conf, but I'm using your puppet.conf right now and its fine :-/. You can inspect the logs in /var/log/puppetdb/puppetdb.log ... if anything is being sent to the app, it should show up in there. I can easily replicate a similar failure btw, when I remove the storeconfigs lines from puppet.conf: Jul 26 12:11:32 puppetdb1 puppet-master[10870]: You cannot collect without storeconfigs being set on line 3 in file /etc/puppet/environments/prd/manifests/site.pp Jul 26 12:11:32 puppetdb1 puppet-master[10870]: You cannot collect exported resources without storeconfigs being set; the collection will be ignored on line 5 in file /etc/puppet/environments/prd/manifests/site.pp Jul 26 12:11:32 puppetdb1 puppet-master[10870]: Not collecting exported resources without storeconfigs Can you show the full error in your puppet master logs like above? Just curious really to see if there is anything else we are missing. Show the full puppet-master dump if you can, after a restart if possible. I'm tempted to ask you for a full debug trace output at some point as well - not sure if that will give us any more info. Also - since reporting and storeconfigs are separate sub-systems I'm really curious to see if you are getting reports sent to PuppetDB as well ... as you have this in your configuration. You should get log lines in puppetdb.log that look something like this: 2013-07-26 12:15:48,114 INFO [command-proc-46] [puppetdb.command] [a4fc3c90-6f90-43a8-937b-0865378f1e54] [store report (EXPERIMENTAL!)] puppet v3.2.2 - puppetdb1.vm Perhaps if you can send me the contents of your recent puppetdb.log that might be helpful. Apparently it is ignoring the settings in my puppet.conf: # puppet config --verbose --debug print|grep storeconfig async_storeconfigs = false storeconfigs = false storeconfigs_backend = active_record thin_storeconfigs = false Researching more! It does feel like this is the case to me (that configuration is being ignored) but I cannot replicate this with your configuration yet. BTW you probably want to use: # puppet master --configprint all | grep store async_storeconfigs = false catalog_cache_terminus = store_configs reports = store,puppetdb storeconfigs = true storeconfigs_backend = puppetdb thin_storeconfigs = false Yes, I most definitely restarted HTTPd since I have it running over Passenger. Although, I do see that when I make changes to puppet.conf it reloads according to /var/log/messages. My puppetdb version is 1.3.2-1. I do have puppetdb-terminus installed via RPM like puppetdb. Here is my puppet.conf: Although I guess I also wanted to make sure the terminus gets loaded, which only occurs after a restart of the application. Can you send me some more files as well, I'm curious about: /etc/puppet/routes.yaml /etc/puppet/puppetdb.conf Neither of these files are overly complicated or should cause trouble, I'm mainly curious to see if there is anything extra in your routes.yaml causing this. Also - what version of Puppet are you using? ken. PS. BTW looking at your environment setup: [prd] modulepath = /etc/puppet/modules:/etc/puppet/modules/prd manifests = /etc/puppet/environments/prd/manifests/site.pp That should be 'manifest' not 'manifests'. -- 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] accessing puppet:/// resources in custom providers
I've got a custom type which I have written which I have given a source attribute that I want as a puppet:///foo/my thing. But I can't find an example of how to get at that content from in there. Is it as obvious as something like Net::HTTP.get(#{:server}/file_content/modules/foo/#{resource[:source]}) Or is this the part where I fall down the indirector rabbit hole? -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.
[Puppet Users] Re: Not collecting exported resources without storeconfigs
Silly me. You are right. I should be using puppet master: # puppet master --configprint all | grep store async_storeconfigs = false catalog_cache_terminus = store_configs reports = foreman,log,store,puppetdb storeconfigs = true storeconfigs_backend = puppetdb thin_storeconfigs = false Also, you are right about my typo with manifests instead of manifest. Sometimes I guess you just need a second set of eyes! It didn't error out, but changing that and it looks like my module with storeconfigs is now working. Thank you!!! -Larry On Wednesday, July 24, 2013 11:57:17 PM UTC-4, Larry Long wrote: # cat /etc/redhat-release CentOS release 6.4 (Final) # puppet --version 3.2.3 # rpm -q puppetdb puppetdb-1.3.2-1.el6.noarch I am now receiving Not collecting exported resources without storeconfigs for my opsview module. It was working fine on puppet 2.7 with Activerecord/MySQL. I am still new to puppetdb so maybe I am missing something. This is from puppet.conf: storeconfigs = true thin_storeconifgs = false storeconfigs_backend = puppetdb Any ideas? Thanks, -Larry -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: Not collecting exported resources without storeconfigs
Also, you are right about my typo with manifests instead of manifest. Sometimes I guess you just need a second set of eyes! Ain't that the truth. It didn't error out, but changing that and it looks like my module with storeconfigs is now working. Thank you!!! Oh good to hear :-). Do you think that was the only problem? It doesn't sound like it should have solved it on its own, thats all. Not that I'm complaining :-). ken. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Heria, Facts, and Puppet
What puppet master version are you running? I also seem to see this bizarre behavior in 2.6.11 and no one at puppet labs has responded to this hiera issue it just goes unanswered, I've also read that the catalog gets compile in random order on each run prior to 2.7, this explains some weird results i've seen in the past. As stated earlier switch and put common last in the hiera.yaml file. As a test try this. change yaml file like so: :backends: - yaml :hierarchy: - common #- '%{env_name}' :yaml: :datadir: /var/lib/hiera/data put the class or module info you have from your envXX.yaml file in the common.yaml file. If catalog run is successful then you are dealing with the weird hiera bug. WOuld be interested to know your results, good luck. On Thursday, July 25, 2013 1:49:56 PM UTC-4, Ellison Marks wrote: Not sure exactly, but in general you want common to be searched last, as hiera by default bails when it finds an answer, so your hierarchy in the conf file is backwards. You'd want the env_name fact above common. On Thursday, July 25, 2013 7:27:26 AM UTC-7, chengkai liang wrote: So something doesn't look right for me when running puppet apply -e 'include ...' for looking heria via facter fact. I have hiera configure as this, :backends: - yaml :hierarchy: - common - '%{env_name}' :yaml: :datadir: /var/lib/hiera/data and, a file envXX.yaml store in the datadir, and I can run *hiera xyz env_name=envXX* to get the the value of abc associate with xyz. Yet, if I export the value variable env_name by *export FACTER_env_name=*envXX, and run: *puppet apply -e 'include my_module * puppet will complaint that it can't find data store in envXX.yaml. From the debug output, debug: importing '/Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp' in environment production debug: Automatically imported puppet_flux2_config from puppet_flux2_config into production debug: hiera(): Hiera YAML backend starting debug: hiera(): Looking up host_header_url in YAML backend debug: hiera(): Looking for data source common Could not find data item host_header_url in any Hiera data file and no default supplied at /Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp:4 on node m-mba.local It seems that it stop looking right after common, while running with *hiera xyz env_name=envXX* *--debug *shows, DEBUG: Thu Jul 25 07:24:48 -0700 2013: Hiera YAML backend starting DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking up host_header_url in YAML backend DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source common DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source *envXX* DEBUG: Thu Jul 25 07:24:48 -0700 2013: Found xyz in *envXX* So why puppet apply won't look further into envXX.yaml file? Anybody can help on this? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Dependency Ordering Confusion
On Tuesday, February 19, 2013 8:48:43 AM UTC-7, jcbollinger wrote: On Monday, February 18, 2013 8:41:53 AM UTC-6, Josh D wrote: I have a module for windows nodes that is defined like: class ast_win { Class['ast_win::env'] ~ Class['ast_win::restart'] - Class['ast_win'] ast_win::env contains a bunch of scripts that modify the environment on the host machine. Mostly the PATH variable, but also other variables (e.g. http_proxy) that are required for downstream installations. ast_win::restart is supposed to run any time there is an environment change. It will restart the Puppet Agent service and prompt the user to close a command prompt, if that's how they're running the agent. Here's the class definition for that guy: class ast_win::restart { file {'RestartAgentBat' : ensure = file, source = 'puppet:///modules/ast_win/restart_agent.bat', path = 'C:\programdata\puppet\restart_agent.bat', recurse = true, mode= 0777, } exec {'restart_agent': cwd = 'C:\programdata\puppet', command = 'C:\programdata\puppet\restart_agent.bat', subscribe = File['RestartAgentBat'], refreshonly = true, creates = 'C:\programdata\puppet\restart_agent.txt', onlyif = 'cmd /c if exist restart_agent.txt (exit 1) else (exit)', path = $::path, } } This much works. What I'm trying to accomplish is when a restart is required, the restart_agent exec will return a non-zero exit status and Puppet will skip all of the resources defined in Class['ast_win'] (Class['ast_win::restart'] - Class['ast_win']). restart_agent.bat creats a text file that wil be deteted on future runs via the onlyif check. The problem I'm running into is that even though restart_agent fails, Puppet still continues onto Class['ast_win']. Currently, I have everything commented out in that class except for a dummy exec task that always fails. Here is an example run, where a restart should be required, restart_agent fails, and puppet continues onto Class['ast_win']: Info: Class[Ast_win::Env]: Scheduling refresh of Class[Ast_win::Restart] Info: Class[Ast_win::Restart]: Scheduling refresh of Exec[restart_agent] Notice: /Stage[main]/Ast_win::Restart/File[RestartAgentBat]/ensure: defined content as '{md5}84ef01a7640a75f2fe702e8991be9e91' Info: /Stage[main]/Ast_win::Restart/File[RestartAgentBat]: Scheduling refresh of Exec[restart_agent] Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: The Puppet Agent service is stopping. Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: The Puppet Agent service was stopped successfully. Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: * * Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: Install Stage Complete. Restarting the puppet service. Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: IF USING A COMMAND PROMPT, YOU MUST NOW CLOSE IT AND OPEN A NEW ONE BEFORE CONTINUING! Notice: /Stage[main]/Ast_win::Restart/Exec[restart_agent]/returns: * * Error: /Stage[main]/Ast_win::Restart/Exec[restart_agent]: Failed to call refresh: C:\programdata\puppet\restart_agent.bat returned 1 instead of one of [0] Error: /Stage[main]/Ast_win::Restart/Exec[restart_agent]: C:\programdata\puppet\restart_agent.bat returned 1 instead of one of [0] Notice: /Stage[main]/Ast_win/Exec[exit_init]/returns: INIT PATH snip / Error: cmd /c echo INIT PATH %PATH% exit 1 returned 1 instead of one of [0] Error: /Stage[main]/Ast_win/Exec[exit_init]/returns: change from notrun to 0 failed: cmd /c echo INIT PATH %PATH% exit 1 returned 1 instead of one of [0] Notice: Finished catalog run in 237.10 seconds Basically, what I'm looking for is a way to say: Always run ast_win::env before ast_win::restart. Always run ast_win::restart before ast_win and don't run ast_win if ast_win::restart fails. The following chain seems to fail that very last bit: Class['ast_win::env'] ~ Class['ast_win::restart'] - Class['ast_win'] Is there any way to accomplish what I'm trying to do? Maybe. It becomes very tricky when you throw signaling relationships and refreshes into the middle of a dependency chain (as opposed to at the end). See http://projects.puppetlabs.com/issues/5876 for a discussion of some of the issues, and vote for it if you're so inclined. That issue has got to rank among the top vote getters, especially for open issues of its age. It can also be tricky to model processes in Puppet, because Puppet focuses on state. Puppet is not a script engine, but in this regard you are trying to use it as one. I suspect that what is happening is that class
[Puppet Users] Enhancement to puppetlabs-vcsrepo
Hello! I was looking at using the puppetlabs-vcsrepo module for a project, but it seems to be missing a feature I need. Specifically, I need to be able to do one of the following two things: svn cat URL FILENAME svn export URL Looking at the code, they do not seem supported. So, after some googling on modifying providers, I took a stab at it and I added a export parameter. Attached to the email is my diff. Keep in mind the following: 1) My Ruby sucks, and probably always will. 2) I've never modified a provider before, and I really have no idea what I'm doing. Requests: 1) Am I going about this the right way? 2) Any suggestions as to how to do it better? As per the suggestions in the Module Contributing wiki page, I'm coming here for suggestions/abuse before going further. Thanks! Jeffrey. P.S. It's been a while since I've played with the puppet module command. Nice work! Was very easy. -- 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. vcsrepo.diff Description: Binary data
Re: [Puppet Users] Re: How do I set global noop?
Hi Sam, it somewhat depends on your requirements, but if you have a window during which changes are not permitted, end of story, what about a cronjob to set it to false at a particular time? or in the same run that you set noop to true, require an exec which creates an at job to re-enable at a specific time? you could go full tilt maverick, and have a cron job which does a curl to a known server asking if the value should be true/false and use sed to change the value, and then wake puppet from its nap. you're essentially removing the ability for puppet to do anything so you'll have to use some other tool to let puppet out of it's cage. I'm sure others have additional (likely better) suggestions.. -- 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: Passenger with Puppet 3.0, problems running under
i just went through same issue. 1. /etc/puppet/rack/puppetmaster/config.ru should be puppet:puppet 2. /var/log/puppet/masterhttp.log neexds to have permission set, not at my computer but i think its 644. youWill see error message in /var/log/messages. hope this helps -- 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.