Re: [Puppet Users] Stupid hiera.yaml wildcard question.
If you use calling_class as part of the hierarchy in your hiera.yaml file, you can have files named after the calling class. https://docs.puppetlabs.com/hiera/1/puppet.html#special-pseudo-variables This would allow you to create a yaml file named after each class in question. You can also use calling_module, but that probably wouldn't give the granularity that you want. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/65b743d5-e9ed-4c9b-9e3c-c9ceac2d6fb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Any advise on this hiera stuff
On Mon, Jun 1, 2015 at 11:42 AM, Twan a.g.a.m.d...@gmail.com wrote: Hiera: session_managers: sm001.guest.lan: - agent01.guest.lan - agent02.guest.lan sm02.guest.lan - agent03.guest.lan - agent04.guest.lan I need to get the following: On session managers a list (comman seperated) of the agents On each agent, the sessionmanager on a line in a configfile. If Im understanding you correctly, then maybe join() from stdlib and inline_template may help you $agents=join($session_managers[$::fqdn], ',') $manager=inline_template('%= @session_managers.keys.select { |k| @session_managers[k].include?(scope[::fqdn) }[0] %') Or, something like that anyway :-) Craig -- Enviatics | Automation and configuration management http://www.enviatics.com | @Enviatics Puppet Training http://www.enviatics.com/training/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACxdKhH6cjFM6GMbHNzDan30WpULE1UTWdHbm2MiGvVJRZxYag%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Lucid leaving apt.puppetlabs.com
Lucid packages have officially been removed from apt.puppetlabs.com and will no longer be available for download On Wed, Apr 22, 2015 at 11:40 AM, Melissa Stone meli...@puppetlabs.com wrote: Ubuntu 10.04 (Lucid Lynx) will reach end of life on 2015-04-30 [1], so we are no longer building new packages for it and will remove it from our apt repository on 2015-06-01. [1] - https://lists.ubuntu.com/archives/ubuntu-announce/2015-March/000193.html -- Melissa Stone Release Engineer, Puppet Labs -- *PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland, Oregon! Join us October 5-9.* *Register now to take advantage of the Early Adopter discount https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyAdopter * *—**save $349!* -- Melissa Stone Release Engineer, Puppet Labs -- *PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland, Oregon! Join us October 5-9.* *Register now to take advantage of the Early Adopter discount https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyAdopter * *—**save $349!* -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHEe_krENb2LqnKeXTNAHbSTRog6YsJ4ScQtH2kwSUd7HnqRHA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Setting puppet.client_cert_path and puppet.client_private_key_path on Windows
I'm trying to bring up a Vagrant box on a Windows host, and provision it using the puppet agent provisioner. Here's the pertinent section of my Vagrantfile: config.vm.provision puppet_server do |puppet| puppet.puppet_server = pg-uni-puppet-01 puppet.client_cert_path = F:\vagrant-machines\Vagrant-Puppet-Agent\ssl-config\ca.pem puppet.client_private_key_path = F:\vagrant-machines\Vagrant-Puppet-Agent\ssl-config\drupal-dev-gossep-local.pem puppet.puppet_node = config.vm.hostname end I'm getting the following error: puppet server provisioner: * The specified client cert path could not be found * The specified client private key path could not be found Do I need to mount the location within Vagrant in order to access the folder where the client cert and private key are stored? Pablo -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/74e5b9e8-fb32-41a8-b53b-4dac267bc000%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] MCollective - Unable to see/interact with client nodes
Puppet Peeps, I am tinkering with the community edition of Puppet (version info below) with MCollective. In my environment I want to test basic MCollective functionality without the SSL overhead. Everything looks fine in the logs, but when I run ‘mco ping’ from either the client or server I only see that single node in the output. Assuming I run this from the master node running ActiveMQ and MCollective, how do I interact/see with my other clients? MCO ping example from the server ## server# mco ping server.mydomain.pem time=19.03 ms ping statistics 1 replies max: 19.03 min: 19.03 avg: 19.03 server# Client/Server Data ## server# rpm -qa | egrep -i 'pup|mcol' puppetserver-1.0.8-1.el6.noarch mcollective-service-common-3.1.3-1.el6.noarch mcollective-2.8.2-1.el6.noarch mcollective-puppet-common-1.10.0-1.el6.noarch mcollective-nettest-agent-3.0.4-1.el6.noarch mcollective-client-2.8.2-1.el6.noarch mcollective-service-agent-3.1.3-1.el6.noarch mcollective-puppet-client-1.10.0-1.el6.noarch mcollective-nettest-common-3.0.4-1.el6.noarch mcollective-nettest-client-3.0.4-1.el6.noarch puppetlabs-release-6-11.noarch puppet-3.8.1-1.el6.noarch mcollective-common-2.8.2-1.el6.noarch mcollective-service-client-3.1.3-1.el6.noarch mcollective-puppet-agent-1.10.0-1.el6.noarch mcollective-facter-facts-1.0.0-1.noarch puppet-server-3.8.1-1.el6.noarch server# server# cat /etc/mcollective/server.cfg | grep -v '^$' | grep -v '^#' daemonize = 1 securityprovider = psk plugin.psk = unset connector = activemq direct_addressing = 1 plugin.activemq.pool.size = 1 plugin.activemq.pool.1.host = server.mydomain.com plugin.activemq.pool.1.port = 61613 plugin.activemq.pool.1.user = mcollective plugin.activemq.pool.1.password = mysexypassword identity = server.mydomain.com.pem factsource = yaml plugin.yaml = /etc/mcollective/facts.yaml classesfile = /var/lib/puppet/state/classes.txt collectives = mcollective main_collective = mcollective registerinterval = 600 rpcaudit = 1 rpcauditprovider = logfile plugin.rpcaudit.logfile = /var/log/mcollective-audit.log logger_type = file loglevel = info logfile = /var/log/mcollective.log keeplogs = 5 max_log_size = 2097152 logfacility = user libdir = /usr/libexec/mcollective server# client# rpm -qa | egrep -i '^pup|^mco' mcollective-common-2.8.2-1.el5 mcollective-puppet-client-1.10.0-1.el5 puppet-3.8.1-1.el5 mcollective-service-client-3.1.3-1.el5 mcollective-client-2.8.2-1.el5 puppetlabs-release-5-11 mcollective-puppet-common-1.10.0-1.el5 mcollective-service-common-3.1.3-1.el5 client# client#cat /etc/mcollective/client.cfg | grep -v '^$' | grep -v '^#' securityprovider = psk plugin.psk = unset connector = activemq plugin.activemq.pool.size = 1 plugin.activemq.pool.1.host = server.mydomain.com plugin.activemq.pool.1.port = 61613 plugin.activemq.pool.1.user = mcollective plugin.activemq.pool.1.password = sexypassword factsource = yaml plugin.yaml = /etc/mcollective/facts.yaml default_discovery_method = mc direct_addressing_threshold = 10 ttl = 60 color = 1 rpclimitmethod = first collectives = mcollective main_collective = mcollective libdir = /usr/libexec/mcollective logger_type = console loglevel = warn client# -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAGymF1C%3DDvsj01h7X3t2dk76Ciu8-kEFd0%2B_ud5orkLu5OL4Dg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] hiera 2.4.4 literal function not working
Hi everyone, I have been porting my puppet management module to puppet 4 and have run across what seems to be a bug but I am not completely sure. My module manages the hiera.yaml file so I need to be able to setup my hierarchy from a hiera variable When this code was running under puppet 3.x i could put this in hiera and it worked. The %%{}{::data_centre} got put in as a %{::data_centre} and everything was awesome. puppet::profile::master::hiera_hierarchy: - defaults - node/%%{}{::data_centre}/%%{}{::clientcert} - node/%%{}{::data_centre}/%%{}{::hostname} - node/%%{}{::clientcert} - node/%%{}{::hostname} - data_centre/%%{}{::data_centre} - OS/%%{}{::operatingsystem}/%%{}{::operatingsystemmajrelease} - env/%%{}{::environment} - global sadly %%{} stopped working in hiera 2 but there is supposed to be a literal function that does the same thing so this should actually work with hiera 2 puppet::profile::master::hiera_hierarchy: - defaults - node/%{literal('%')}{::data_centre}/%{literal('%')}{::clientcert} - node/%{literal('%')}{::data_centre}/%{literal('%')}{::hostname} - node/%{literal('%')}{::clientcert} - node/%{literal('%')}{::hostname} - data_centre/%{literal('%')}{::data_centre} - OS/%{literal('%')}{::operatingsystem}/%{literal('%')}{::operatingsystemmajrelease} - env/%{literal('%')}{::environment} - global sadly it doesn't and gives me this error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Error from DataBinding 'hiera' while looking up 'puppet::profile::master::hiera_hierarchy': Detected in [literal('%')] at /vagrant/r10k/upstream/development/manifests/site.pp:1:1 on node puppet.abstractit.com.au and puts this in my hiera.yaml file instead. - node/%#Hiera::Scope:0x19fcb05f{::data_centre}/%#Hiera::Scope:0x19fcb05f{::clientcert} Has anyone else seen this sort of behaviour? -- Pete Brown Director and Primary Infrastructure Developer Abstract IT Pty Ltd. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAM8R_x9a%3D6XqK8r-osTBVmnFw%2BTtOQ9C038mXOsjaeGqChOjAQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] MCollective - Unable to see/interact with client nodes
You're misunderstanding the nature of server and client in the mcollective architecture. ;) Every node you want to manage in the cluster is a server (i.e. has a valid server.cfg and is running the daemon), and the node(s) that you are issuing commands from is a client (i.e. has a valid client.cfg and only runs the daemon if it's also a server). - Peter On 6/2/2015 8:28 PM, Tom Tucker wrote: Puppet Peeps, I am tinkering with the community edition of Puppet (version info below) with MCollective. In my environment I want to test basic MCollective functionality without the SSL overhead. Everything looks fine in the logs, but when I run ‘mco ping’ from either the client or server I only see that single node in the output. Assuming I run this from the master node running ActiveMQ and MCollective, how do I interact/see with my other clients? MCO ping example from the server ## server# mco ping server.mydomain.pem time=19.03 ms ping statistics 1 replies max: 19.03 min: 19.03 avg: 19.03 server# Client/Server Data ## server# rpm -qa | egrep -i 'pup|mcol' puppetserver-1.0.8-1.el6.noarch mcollective-service-common-3.1.3-1.el6.noarch mcollective-2.8.2-1.el6.noarch mcollective-puppet-common-1.10.0-1.el6.noarch mcollective-nettest-agent-3.0.4-1.el6.noarch mcollective-client-2.8.2-1.el6.noarch mcollective-service-agent-3.1.3-1.el6.noarch mcollective-puppet-client-1.10.0-1.el6.noarch mcollective-nettest-common-3.0.4-1.el6.noarch mcollective-nettest-client-3.0.4-1.el6.noarch puppetlabs-release-6-11.noarch puppet-3.8.1-1.el6.noarch mcollective-common-2.8.2-1.el6.noarch mcollective-service-client-3.1.3-1.el6.noarch mcollective-puppet-agent-1.10.0-1.el6.noarch mcollective-facter-facts-1.0.0-1.noarch puppet-server-3.8.1-1.el6.noarch server# server# cat /etc/mcollective/server.cfg | grep -v '^$' | grep -v '^#' daemonize = 1 securityprovider = psk plugin.psk = unset connector = activemq direct_addressing = 1 plugin.activemq.pool.size = 1 plugin.activemq.pool.1.host = server.mydomain.com http://server.mydomain.com plugin.activemq.pool.1.port = 61613 plugin.activemq.pool.1.user = mcollective plugin.activemq.pool.1.password = mysexypassword identity = server.mydomain.com.pem factsource = yaml plugin.yaml = /etc/mcollective/facts.yaml classesfile = /var/lib/puppet/state/classes.txt collectives = mcollective main_collective = mcollective registerinterval = 600 rpcaudit = 1 rpcauditprovider = logfile plugin.rpcaudit.logfile = /var/log/mcollective-audit.log logger_type = file loglevel = info logfile = /var/log/mcollective.log keeplogs = 5 max_log_size = 2097152 logfacility = user libdir = /usr/libexec/mcollective server# client# rpm -qa | egrep -i '^pup|^mco' mcollective-common-2.8.2-1.el5 mcollective-puppet-client-1.10.0-1.el5 puppet-3.8.1-1.el5 mcollective-service-client-3.1.3-1.el5 mcollective-client-2.8.2-1.el5 puppetlabs-release-5-11 mcollective-puppet-common-1.10.0-1.el5 mcollective-service-common-3.1.3-1.el5 client# client#cat /etc/mcollective/client.cfg | grep -v '^$' | grep -v '^#' securityprovider = psk plugin.psk = unset connector = activemq plugin.activemq.pool.size = 1 plugin.activemq.pool.1.host = server.mydomain.com http://server.mydomain.com plugin.activemq.pool.1.port = 61613 plugin.activemq.pool.1.user = mcollective plugin.activemq.pool.1.password = sexypassword factsource = yaml plugin.yaml = /etc/mcollective/facts.yaml default_discovery_method = mc direct_addressing_threshold = 10 ttl = 60 color = 1 rpclimitmethod = first collectives = mcollective main_collective = mcollective libdir = /usr/libexec/mcollective logger_type = console loglevel = warn client# -- 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 mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAGymF1C%3DDvsj01h7X3t2dk76Ciu8-kEFd0%2B_ud5orkLu5OL4Dg%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAGymF1C%3DDvsj01h7X3t2dk76Ciu8-kEFd0%2B_ud5orkLu5OL4Dg%40mail.gmail.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/556E88BA.9000800%40alter3d.ca. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Validating more than one type of data structure at a time
I am trying to find out how I can validate more than one type of data structure for a given value in a manifest? In particular I would like to be able to have either a string or a hash be a valid data structure. Something like: if ($myvar != false) { validate_string($myvar) || validate_hash($myvar) } Does anybody know if this is possible to do? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/732c0ec6-d9bb-4f32-9eae-4667037a0e87%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Puppet Learning VM - Resource Ordering Quest - Task 6/6
Hi, Firstly, apologies if i have started a duplicate topic, this is my first post I couldn't find a topic that matches my question... I ran into a problem when working on the Ordering quest in the Puppet Learning VM. It is when managing the sshd service, during the final task number 6 the quest asks you to complete the following; The sshd/manifests/init.pp manifest should should define the sshd class. I have followed along and cannot see any issues with my manifest, however when applying the manifest it doesn't do anything, and the task is not completed. My 'sshd/manifests/init.pp' manifest file looks like this: * 1 class sshd {* * 2* * 3 package { 'openssh-server':* * 4 ensure = present,* * 5 before= File['/etc/ssh/sshd_config'],* * 6 }* * 7* * 8 file { '/etc/ssh/sshd_config':* * 9 ensure=file,* * 10 mode =600,* * 11 source='puppet:///modules/sshd/sshd_config',* * 12 }* * 13* * 14 service { 'sshd':* * 15 ensure =running,* * 16 enable =true,* * 17 subscribe =File['/etc/ssh/sshd_config'],* * 18 }* * 19* * 20 }* and my 'sshd/tests/init.pp' manifest looks like: *1 include 'sshd'* The puppet parser tool returns no syntax errors, however when using 'puppet apply sshd/tests/init.pp' nothing seems to happen; [root@learning /etc/puppetlabs/puppet/environments/production/modules]# puppet apply sshd/tests/init.pp Notice: Compiled catalog for learning.puppetlabs.vm in environment production in 0.83 seconds Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false. (at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in module:Puppet') Notice: Finished catalog run in 0.63 seconds [root@learning /etc/puppetlabs/puppet/environments/production/modules]# Please can anyone point me in the right direction? Again, apologies if I have posted in the wrong location, feel free to direct me to the correct place. Thanks LA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ccce60b1-f98e-4ecf-9909-32d602dab7f3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Stupid hiera.yaml wildcard question.
On Tuesday, June 2, 2015 at 2:55:16 AM UTC-5, jamese wrote: If you use calling_class as part of the hierarchy in your hiera.yaml file, you can have files named after the calling class. https://docs.puppetlabs.com/hiera/1/puppet.html#special-pseudo-variables This would allow you to create a yaml file named after each class in question. You can also use calling_module, but that probably wouldn't give the granularity that you want. Yes, one of these is the standard way to approach such problems, provided that you're not looking to provide for cross-module data directly via Hiera. You use the calling_class or calling_module variable to define one or more levels of your hierarchy (i.e. in hiera.yaml), so that lookups choose the correct data file for their context. Note that this is actually more efficient than what you asked: instead of loading *all* the data files, it will load exactly the one it needs. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/80f0bd3d-840f-4a65-8923-22037381b672%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Can I use the 'contain' function and relationship ordering?
On Monday, June 1, 2015 at 6:21:51 PM UTC-5, Stefan Lasiewski wrote: Hello Everyone, I'm using Puppet 3.8 and I have a question about containment, anchoring and relationship ordering. I am following the Beginner's Guide to Modules https://docs.puppetlabs.com/guides/module_guides/bgtm.html#containment-and-anchoring section on Containment and Anchoring. The guide provides a containment example for a basic install/config/service pattern like this in init.pp : anchor { 'module::begin': } anchor { 'module::end' } Anchor['module::begin'] - Class['module::install'] - Class['module::config'] - Class['module::service'] - Anchor['module::end'] From what I understand, this advantage can keep the relationship ordering inside the main manifest, where the relationships are visible and obvious. This is a style that some folks prefer. However, the 'Anchor' syntax seems a little verbose and archaic, and I read that I can also contain classes using the `contain` function, as of Puppet 3.4 and later. Yes, use of Anchor resources, or analogous use of ordinary resources, is a bit old-school these days. The contain() function was introduced to fill the containment role that Anchor also (more clumsily) serves. So, something like this might work: contain ( 'install', 'config', 'service') It depends on what you mean by work, but basically yes. I do recommend using fully-qualified class names in this context (e.g. module::install), however. You should be aware that the contain() function has the additional effect of declaring those named classes that have not already been declared (exactly the same as if they were named to the include() function). Also, as you seem to recognize, it does not establish any relationships among the classes named by the arguments. My question: Is it possible to use the `contain` function and still use ordering arrows? For example, I'd like the `install` class to be called before the `config` class, and the `config` class to be called before the `service` class. Absolutely, but you do have to be careful about declaring relationships between contained classes and classes or resources that are not contained in the same scope. There's nothing inherently wrong with that, but it is a bit more susceptible to dependency cycles than are most other relationships. For example, this would be a pretty canonical replacement for your first code snippet: contain('module::install', 'module::config', 'module::service') Class['module::install'] - Class['module::config'] - Class[ 'module::service'] John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b3e41012-7df4-460a-ab3b-b8af73e064d2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Puppet Learning VM - Resource Ordering Quest - Task 6/6
Hi Luke, This is also my first post :) But maybe I can help you. So I have created the same class 'sshd' as you. Here the structure : [vagrant@vm01 modules]$ pwd /etc/puppet/modules [vagrant@vm01 modules]$ tree . └── sshd ├── files │ └── sshd_config ├── manifests │ └── init.pp └── tests └── init.pp 4 directories, 3 files And I have run the init.pp in the test directory with puppet apply while putting the --modulepath option. This option can be added in your puppet.con located in the /etc/puppet/ directory. [vagrant@vm01 ~]$ sudo puppet apply --modulepath=/etc/puppet/modules/ /etc/puppet/modules/sshd/tests/init.pp Notice: Compiled catalog for vm01.v.cablecom.net in environment production in 0.53 seconds Notice: /Stage[main]/Sshd/File[/etc/ssh/sshd_config]/content: content changed '{md5}3bdf2cc35b8e94d3ec2440b921db1728' to '{md5}d41d8cd98f00b204e9800998ecf8427e' Notice: /Stage[main]/Sshd/Service[sshd]: Triggered 'refresh' from 1 events Notice: Finished catalog run in 0.52 seconds You're puppet code is valid and execute without error. Hope this help ! Cheers, Edouard. 2015-06-02 13:42 GMT+02:00 Luke Anderson landerso...@gmail.com: Hi, Firstly, apologies if i have started a duplicate topic, this is my first post I couldn't find a topic that matches my question... I ran into a problem when working on the Ordering quest in the Puppet Learning VM. It is when managing the sshd service, during the final task number 6 the quest asks you to complete the following; The sshd/manifests/init.pp manifest should should define the sshd class. I have followed along and cannot see any issues with my manifest, however when applying the manifest it doesn't do anything, and the task is not completed. My 'sshd/manifests/init.pp' manifest file looks like this: * 1 class sshd {* * 2* * 3 package { 'openssh-server':* * 4 ensure = present,* * 5 before= File['/etc/ssh/sshd_config'],* * 6 }* * 7* * 8 file { '/etc/ssh/sshd_config':* * 9 ensure=file,* * 10 mode =600,* * 11 source='puppet:///modules/sshd/sshd_config',* * 12 }* * 13* * 14 service { 'sshd':* * 15 ensure =running,* * 16 enable =true,* * 17 subscribe =File['/etc/ssh/sshd_config'],* * 18 }* * 19* * 20 }* and my 'sshd/tests/init.pp' manifest looks like: *1 include 'sshd'* The puppet parser tool returns no syntax errors, however when using 'puppet apply sshd/tests/init.pp' nothing seems to happen; [root@learning /etc/puppetlabs/puppet/environments/production/modules]# puppet apply sshd/tests/init.pp Notice: Compiled catalog for learning.puppetlabs.vm in environment production in 0.83 seconds Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false. (at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in module:Puppet') Notice: Finished catalog run in 0.63 seconds [root@learning /etc/puppetlabs/puppet/environments/production/modules]# Please can anyone point me in the right direction? Again, apologies if I have posted in the wrong location, feel free to direct me to the correct place. Thanks LA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ccce60b1-f98e-4ecf-9909-32d602dab7f3%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/ccce60b1-f98e-4ecf-9909-32d602dab7f3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Edouard Fazenda Tel : 0688451444 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJWWvFrgmfX%2BAsQU2dNjbD%3D1HvcXX%3DRHhnRQUFyKThOPsO4o%2BQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Puppet Learning VM - Resource Ordering Quest - Task 6/6
Add the debug flag (--debug) and see what you get. Also, put a dummy notify resource in your module file to get an indication that it is being processed. Like this : notify {'here I am': } “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” (Bill Waterson: Calvin Hobbes) On Jun 02, 2015, at 09:18 AM, Luke Anderson landerso...@gmail.com wrote: Hi, Firstly, apologies if i have started a duplicate topic, this is my first post I couldn't find a topic that matches my question... I ran into a problem when working on the Ordering quest in the Puppet Learning VM. It is when managing the sshd service, during the final task number 6 the quest asks you to complete the following; The sshd/manifests/init.pp manifest should should define the sshd class. I have followed along and cannot see any issues with my manifest, however when applying the manifest it doesn't do anything, and the task is not completed. My 'sshd/manifests/init.pp' manifest file looks like this: 1 class sshd { 2 3 package { 'openssh-server': 4 ensure = present, 5 before = File['/etc/ssh/sshd_config'], 6 } 7 8 file { '/etc/ssh/sshd_config': 9 ensure = file, 10 mode = 600, 11 source = 'puppet:///modules/sshd/sshd_config', 12 } 13 14 service { 'sshd': 15 ensure = running, 16 enable = true, 17 subscribe = File['/etc/ssh/sshd_config'], 18 } 19 20 } and my 'sshd/tests/init.pp' manifest looks like: 1 include 'sshd' The puppet parser tool returns no syntax errors, however when using 'puppet apply sshd/tests/init.pp' nothing seems to happen; [root@learning /etc/puppetlabs/puppet/environments/production/modules]# puppet apply sshd/tests/init.pp Notice: Compiled catalog for learning.puppetlabs.vm in environment production in 0.83 seconds Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false. (at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in module:Puppet') Notice: Finished catalog run in 0.63 seconds [root@learning /etc/puppetlabs/puppet/environments/production/modules]# Please can anyone point me in the right direction? Again, apologies if I have posted in the wrong location, feel free to direct me to the correct place. Thanks LA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/ccce60b1-f98e-4ecf-9909-32d602dab7f3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f5d0841f-2498-4e0e-b158-68b8cf24c007%40me.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Stupid hiera.yaml wildcard question.
On Tue, Jun 2, 2015 at 3:35 PM, jcbollinger john.bollin...@stjude.org wrote: On Tuesday, June 2, 2015 at 2:55:16 AM UTC-5, jamese wrote: You can also use calling_module, but that probably wouldn't give the granularity that you want. Yes, one of these is the standard way to approach such problems, provided that you're not looking to provide for cross-module data directly via Hiera. You use the calling_class or calling_module variable to define one or more levels of your hierarchy (i.e. in hiera.yaml), so that lookups choose the correct data file for their context. Note that this is actually more efficient than what you asked: instead of loading all the data files, it will load exactly the one it needs. +1 to calling_module - I nearly always use this approach when using the YAML back end for Hiera. You are right, it comes with the limitation that I cant look up tango::bar from class foo without some very nasty hackery, but this isn't such a bad thing. If you are relying on this kind of cross-module data sharing then you probably have a larger design issue, modules that require data from other modules should get them by including the class and referencing them in Puppet ($::tango::bar), not circumventing the module and going straight to Hiera, thus keeping any logic (such as params.pp defaults) that the module provides. In a small number of cases I've required a variable from a class that is not included, and therefore this pattern failed - but in all of those cases a small re-think revealed a few design flaws and things were re-factored. Craig -- Enviatics | Automation and configuration management http://www.enviatics.com | @Enviatics Puppet Training http://www.enviatics.com/training/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACxdKhGhEC70%2BP47h5kfpO0mGtSuXAz9QEoHgfWern_Ow5jv3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Need Help to add multiple host entries in yaml file instead of repeating host attribute in manifest.
Here is the generic code for host entires: class abcd::hosts ( ) inherits abcd::params { host { 'etc_hosts': ensure = 'present', name = $fqdn, ip = $ip, host_aliases = $host_aliases, } ## above values want to populate from yaml file and below is the output of yaml file for single host entry. what if I want to add multiple host entires using same variable. abcd.yaml abcd::fqdn: 'example.com' abcd::ip: '1.1.1.1' abcd::host_aliases: 'example' can some one please give me syntax to add multiple entires in hiera using single host attribute in manifest? and here is the example line using in params.pp. fqdn = hiera('abcd::fqdn', 'default.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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6e7482de-8df0-4c26-ada1-ef8b0b988ecd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: [Puppet Users] Stupid hiera.yaml wildcard question.
On Tuesday, June 02, 2015 at 12:55 AM, jamese james.eckers...@gmail.com sent: If you use calling_class as part of the hierarchy in your hiera.yaml file, you can have files named after the calling class. https://docs.puppetlabs.com/hiera/1/puppet.html#special-pseudo- variables This would allow you to create a yaml file named after each class in question. You can also use calling_module, but that probably wouldn't give the granularity that you want. Hmm. That had been something that I looked at, but this bit in the documentation: Note that these variables are effectively local scope, as they are pseudo-variables that only exist within the context of a specific class, and only inside of hiera. Therefore, they must be called as %{variable_name} and never %{::variable_name}. They are not top-scope. Followed by: Do not use local Puppet variables in Hiera’s hierarchy or data sources. Only use facts and ENC-set top-scope variables. Led me to discard them as useful in constructing a hiera.yaml hierarchy. From your response (and the replies from Craig and John) it appears that I was incorrect to do so. Thanks! -- Robert Davidson -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1EE73329D6577F44A3C2FB0F7D4ACAE98CEFA274%40mbx-02. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Unable to use Weblogic slinet installation on puppet
What are the privileged user that need to set on the Centos Linux version Linux centos 2.6.32-504.16.2.el6.x86_64 Please advice any setting we need to do on the puppet module... user { 'weblogic': ensure = present, groups = ['root'], } Running 3.7.3 (Puppet Enterprise 3.7.1) on On Thursday, May 28, 2015 at 12:31:25 PM UTC+8, Bala chandran wrote: Having this error when the module is run Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to change access permissions on the temporary directory /tmp/OraInstall2015-05-27_01-02-38PM. Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to locate or create a temporary directory for the Oracle Universal Installer. what permisiion is required for /tmp folder. I have already assign 777 for the .tmp folder. The Java -jar wls_212100.far is not working to install. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/297a304a-9dd7-4dc0-a267-2247687aed5d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Unable to use Weblogic slinet installation on puppet
I am running puppet version 3.7.3 (Puppet Enterprise 3.7.1) Pls advice is there any issues with compatibility issue with Linux centos On Thursday, May 28, 2015 at 12:31:25 PM UTC+8, Bala chandran wrote: Having this error when the module is run Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to change access permissions on the temporary directory /tmp/OraInstall2015-05-27_01-02-38PM. Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to locate or create a temporary directory for the Oracle Universal Installer. what permisiion is required for /tmp folder. I have already assign 777 for the .tmp folder. The Java -jar wls_212100.far is not working to install. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/65c922d0-a334-4c0d-982f-77dbd70f4ec4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.