Re: [Puppet Users] Re: Looping in Ruby DSL
On 02/09/2012 05:50 AM, Eric Shamow wrote: Sateesh, It is better if you don't look at it as a loop. A loop is a very procedural concept. You are working with a machine that you are trying to get into a fixed state. So better to think I want to have a bunch of similar-looking resources that are identified and enumerated in an array. This leads you to defined types: http://docs.puppetlabs.com/learning/definedtypes.html Which is probably the way you should do this. +1 Be especially aware that you need a creates or onlyif constraint, otherwise puppet will perform your exec through each run. Here's a pointer: define proxy_ring($sip) { exec { account-for-zone$name: command = swift-ring-builder account.builder add z$name-$sip:6002/sdb1 100, creates = ?! cwd = /etc/swift, require = Class['swift::proxy-install'], path = [/bin, /sbin, /usr/bin, /usr/sbin]; containter-for-zone$name: ... } Use this like proxy_ring { 1: $ip1; 2: $ip2; ... } If you prefer arrays - that's harder. You could store the definitions in a hash and use the create_resources() function. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] How to add Node Description as extra column in table overview
Hi, I have about 20+ nodes managed with Puppet, and they all have names like xyz-123. I added a description to each of them (e.g. like test build server, production DB 1, etc.). Now what I would like, is to have these description strings displayed in the dashboard tables (e.g. All, Unresponsive, etc.) as an extra column next to Node name. This would help in identifying much quicker whats going on, or whats wrong. Any way to enable that? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Schedule for own resources?
Hi, On 02/03/2012 08:38 AM, Os wrote: On Feb 2, 9:43 pm, jcbollinger john.bollin...@stjude.org wrote: Hmm. That statement may have been overly optimistic. I think it's pretty clear clear cut that schedules *should* work for defined type instances, but perhaps Puppet is buggy in that regard. I don't see anything wrong with your manifest or your expectations. I would submit a bug report / feature request. This seems to be related to, but distinct from, open (and accepted) feature request 5856:http://projects.puppetlabs.com/issues/5856. John Many Thanks for the reply and the link. I will keep that in mind, For now I will simply set the schedule in the cron-resource as a workaround. This reminds me a lot of http://projects.puppetlabs.com/issues/7928 Cheers, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Time interval within execution of scripts from the server
Hi, I have multiple script to be copied executed from the puppet server on the client systems but i want to execute each script within a timeframe such as hourly, weekly or monthly from the puppet server as i dont want to execute all scripts on the same frequency. Any help will be greatly appreciated. Thanks mukulm -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Cache for the local system while offline
Hi, I want to cache the updates for the users system received from the server so that the users can get the updates from the local system cache while offline. Any idea how can server updates be stored on the users system while offline ? Thanks mukulm -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: puppet, virtualenv, and .bashrc
On Feb 8, 2:13 pm, kevin c kcalla...@gmail.com wrote: Thanks John, exec { 'panama-eggs': path = [/bin,/usr/bin,/usr/local/python/bin], environment = ['WORKON_HOME=/home/panama/.virtualenvs', 'PIP_LOG_FILE=/tmp/pip-freeze-prod.log', 'PIP_VIRTUALENV_BASE=/home/ panama/.virtualenvs', 'VIRTUALENVWRAPPER_PYTHON=/usr/local/python/bin/ python'], command = . /usr/local/python/bin/virtualenvwrapper.sh; workon dev mmf_eggs, provider = shell, logoutput = true, user = panama, group = panama, require = [Exec[mmf-panama-install], Exec['symlink-panama- post-activate']] } results in debug: Executing '/bin/sh -c /usr/local/python/bin/ virtualenvwrapper.sh; workon dev mmf_eggs' err: /Stage[main]/Panama/Exec[panama-eggs]/returns: change from notrun to 0 failed: mkdir: cannot create directory `/root/.virtualenvs': Permission denied /bin/sh: workon: command not found Even though there already exists a /home/panama/.virtualenvs/dev virtual environment Any ideas? I think the virtualenvwrapper.sh script is failing before it defines function workon (note the permission denied error). When the host shell tries to execute the second part of the comand, but it still doesn't know what workon is. Fix the permission problem first, and then see where you stand. It is highly suspicious that the Puppet agent, running as root, is denied permission to write in root's home directory. You are probably running SELinux in enforcing mode. If you want to continue doing that then you can perhaps solve the problem by modifying either the command parameter or the environment setup script, but you might just need to update your SELinux policy. I'm afraid I can't help you with the specifics. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Odd behavior with hiera 0.3.0
$ cat /etc/hiera.yaml --- :hierarchy: - %{operatingsystem} - common :backends: - yaml :yaml: :datadir: /tmp/hieradata $ cat /tmp/hieradata/Debian.yaml --- kitty : 'Handsome' $ cat /tmp/hieradata/common.yaml --- kitty : 'Evil' $ facter operatingsystem Debian $ hiera -d kitty DEBUG: Thu Feb 09 10:09:01 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking for data source common Evil $ hiera -d kitty operatingsystem=Debian DEBUG: Thu Feb 09 10:46:20 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking for data source Debian Handsome Shouldn't Debian.yaml take priority over common.yaml though? Not sure why I need to pass operatingsystem=Debian in as an argument to hiera Best, Adam -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Odd behavior with hiera 0.3.0
Hiera as a command line tool is unaware of the $::operatingsystem variable available to Puppet as a fact. So when running through puppet, operatingsystem would be a known value, but when running through the command line, you need to specify whatever information hiera needs to parse. -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 On Thursday, February 9, 2012 at 10:49 AM, windowsrefund wrote: $ cat /etc/hiera.yaml --- :hierarchy: - %{operatingsystem} - common :backends: - yaml :yaml: :datadir: /tmp/hieradata $ cat /tmp/hieradata/Debian.yaml --- kitty : 'Handsome' $ cat /tmp/hieradata/common.yaml --- kitty : 'Evil' $ facter operatingsystem Debian $ hiera -d kitty DEBUG: Thu Feb 09 10:09:01 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking for data source common Evil $ hiera -d kitty operatingsystem=Debian DEBUG: Thu Feb 09 10:46:20 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking for data source Debian Handsome Shouldn't Debian.yaml take priority over common.yaml though? Not sure why I need to pass operatingsystem=Debian in as an argument to hiera Best, Adam -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto:puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto:puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Odd behavior with hiera 0.3.0
To add: there's a reason for this - you are likely running the command line tool on the master, where facter output does not match what it would be when evaluating a client. So you are essentially saying for a client that looks like X, what would hiera tell me? One thought would be to write a quick script to grab the cached facts for a node and turn the relevant ones into hiera parameters, then use this to run hiera against an individual host. -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 On Thursday, February 9, 2012 at 10:52 AM, Eric Shamow wrote: Hiera as a command line tool is unaware of the $::operatingsystem variable available to Puppet as a fact. So when running through puppet, operatingsystem would be a known value, but when running through the command line, you need to specify whatever information hiera needs to parse. -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 On Thursday, February 9, 2012 at 10:49 AM, windowsrefund wrote: $ cat /etc/hiera.yaml --- :hierarchy: - %{operatingsystem} - common :backends: - yaml :yaml: :datadir: /tmp/hieradata $ cat /tmp/hieradata/Debian.yaml --- kitty : 'Handsome' $ cat /tmp/hieradata/common.yaml --- kitty : 'Evil' $ facter operatingsystem Debian $ hiera -d kitty DEBUG: Thu Feb 09 10:09:01 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:09:01 -0500 2012: Looking for data source common Evil $ hiera -d kitty operatingsystem=Debian DEBUG: Thu Feb 09 10:46:20 -0500 2012: Hiera YAML backend starting DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking up cat in YAML backend DEBUG: Thu Feb 09 10:46:20 -0500 2012: Looking for data source Debian Handsome Shouldn't Debian.yaml take priority over common.yaml though? Not sure why I need to pass operatingsystem=Debian in as an argument to hiera Best, Adam -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto:puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto:puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Odd behavior with hiera 0.3.0
Excellent. I didn't realize this behavior of the standalone hiera binary. Thanks again. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Newbie: Confused about where to start managing users...
On Feb 8, 11:02 am, Peter Valdemar Mørch pmo...@gmail.com wrote: On Wed, Feb 8, 2012 at 4:23 PM, jcbollinger john.bollin...@stjude.org wrote: To give you a good answer, I need to understand this a bit better, and I'm having trouble with that statement. On Unix-like systems the user name is the primary identifier, and UIDs are only secondary. It is even possible for two or more users to have the same UID. What, then, does it mean for a user name to change while the UID remains constant? I'm looking for the big picture here, not just the /etc/ passwd view of the world. The big picture: We create an appliance (debian-in-a-pizza-box). In this appliance, one can create users. There is a users database table. In that, the user ID is unique, but the UI allows the user to modify user names (along with e.g. password). A new feature request is that it should be possible for such configured users to log in vial SSH to the appliance, because it may have network access to other networks than the user has from his browser/workstation and use the appliance as a jump host. So now the task is to create local users based on the contents of our users database table. The UI for his table also allows configuration of a password (details about sha512 removed here) and SSH key. They must have their own home dirs so they can use the appliance as a TFTP server (details removed). In order to get a little separation for these CLI users, we create a debootstrap/chroot for these users. So sshd_config's ChrootDirectory is set up appropriately for these users, and for each user, we create /jail/home/username, /jail/home/username/.ssh/authorized_keys, /home/username and /home/username/.ssh/authorized_keys that is a soft link to /jail/home/username/.ssh/authorized_keys (I want the user to be able to add to configure his own authorized keys via CLI too, and sshd reads .ssh/authorized_keys from the outer root, not the jail, even for ChrootDirectory users, for some reason I don't understand.) As users come and go and get renamed, I expect /home, /jail/home, /etc/passwd and /jail/etc/passwd to follow suit. I'm thinking that doing the setup inside the jail can be done with installing puppet inside the jail too and running puppet once again inside the jail with setup from outside the jail. Exact same complication in the jail as outside. Solve it for one and its solved for the other. Ok. The most important thing I take from that, as it applies to your questions, is that as far as Linux is concerned, changing a user name typically means removing a user and creating a new one with the same UID as the old but a different user name. Your special case of swapping two or more user names in a cycle (as it appears to your DB) manifests on the Linux side as swapping the corresponding UIDs. That all reflects a clash between your DB's model of the user world and the Linux's: in database terms, it is the user name, not the UID, that is the PK of the Linux user database. UIDs aren't even required to be unique. It would be convenient if your DB's entity model better matched the underlying Linux model, but I don't imagine it's feasible to make that so. That shouldn't prevent you from using Puppet to achieve your aim, but it will make it trickier. If it would be sufficient to bound the purge range only below, then you could do this: resources { user: purge = true, unless_system_user = 2000 } Cool! Yes, that is fine. We just want the possibility of creating real non-system and non-chroot users too. Puppet probably can handle your complex renaming cases by transiently leveraging the ability (available on many, but not all, client OSs) for one UID to be assigned to multiple users: ... So far, none of this touches on user home directories. Puppet's User resource does have the ability to manage home directories on most OSs (unless you are relying on LDAP for your user DB), but it's not clear to me what management, if any, you might want there. This is where my confusion over what you mean about renaming accounts comes most to bear. The most important is the user foo has home dir /home/foo and correct uid. Ideal would be that if a user is renamed from a to b, that /home/a is renamed to /home/b. I suspected you might say that. Anyway, the bottom line is that you're not going to see that directory renaming behavior without putting a fair amount of code into it yourself, and I'm not immediately certain what that code would need to be or where you would plug it in. You could get a similar effect, however, by naming home directories by UID instead of by user name. Puppet could even manage symlinks for you to allow users to reference their homes by username: user { 'alice': uid = 2001, allowdupe = true, home = '/home/2001', } file { '/home/alice': ensure = 'link', target = '/home/2001', } We can live with sudo rm -r /home/a; sudo mkdir
Re: [Puppet Users] Using LDAP with puppet
Sorry to ask but, what's ECN? Best regards, -- Kwame On Jan 26, 2012 11:45 AM, Matt Ackerman m...@808.org wrote: Does anyone have experience using LDAP as the ENC at medium to large scale? We have around 600 nodes but will quickly grow that to 2000 or so in short order. If so, is it working well? Would you do it again? If it didn't work what did you replace it with? We are thinking of using it and was looking for a little feedback from the group if anyone has done this. On the surface it sounds very nice to have the flexibility of a standards based system like LDAP and I know LDAP can scale very well for read intensive operations. Cheers! -Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@** googlegroups.com puppet-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en . -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Using LDAP with puppet
ENC is the external node classifier. http://docs.puppetlabs.com/guides/external_nodes.html On Thu, Feb 9, 2012 at 2:15 PM, Daniel Bahena informa...@gmail.com wrote: Sorry to ask but, what's ECN? Best regards, -- Kwame On Jan 26, 2012 11:45 AM, Matt Ackerman m...@808.org wrote: Does anyone have experience using LDAP as the ENC at medium to large scale? We have around 600 nodes but will quickly grow that to 2000 or so in short order. If so, is it working well? Would you do it again? If it didn't work what did you replace it with? We are thinking of using it and was looking for a little feedback from the group if anyone has done this. On the surface it sounds very nice to have the flexibility of a standards based system like LDAP and I know LDAP can scale very well for read intensive operations. Cheers! -Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Strange behavior by service
On 02/09/2012 06:16 AM, jcbollinger wrote: On Feb 8, 5:34 pm, Aaron Grewell aaron.grew...@gmail.com wrote: I've got a bit of a head-scratcher here, though I'm sure it must be something small. I'm trying to enable a service for next boot without starting it. That usually just works but for some reason this time around it isn't. The node keeps trying to start the service which will always fail because it requires a reboot in order to enable the necessary kernel parameters. How do I make Puppet stop trying to start the service? I would try adding ensure = undef to the service's parameters. If that doesn't work then I can't imagine what would. John Thanks John, that did the trick. I'm not sure if I've got a service default set somewhere I didn't realize or what but at least now it's doing the right thing. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Puppet master can not find file_metadata for my puppet module
Hello, I am running a puppet master version 2.7.5 on Centos 5.7 and a puppet agent version 2.7.5. I am simply trying to apply changes to files by defining a file resource in my manifest. When I execute my puppet agent to do the installation it complains it can not find the file meta data. Here is my manifest. class neospeech::config { file { /usr/vwmrcpd/vwmrcpd/vwmrcpd: owner = root, group = root, mode= 755, source = puppet:///modules/neospeech/vmwrcpd, require = Class[neospeech::install], } file { /usr/vwmrcpd/ini/vwmrcpsrv.ini: owner = root, group = root, mode= 644, source = puppet:///modules/neospeech/vmwrcpsrv.ini, require = Class[neospeech::install], } exec { service neospeech start: path = /sbin:/bin:/usr/bin:/usr/sbin, command = service neospeech start, subscribe = File[/usr/vwmrcpd/vwmrcpd/vwmrcpd], refreshonly = true, require = Class[neospeech::install], } } here is my directory structure under my puppet modules directory [root@puppet neospeech]# pwd /etc/puppet/modules/neospeech [root@puppet neospeech]# ls -lR .: total 8 drwxr-xr-x 2 puppet puppet 4096 Feb 9 12:47 files drwxr-xr-x 2 puppet puppet 4096 Feb 9 13:49 manifests ./files: total 1160 -rw-r--r-- 1 puppet puppet 768 Feb 9 12:46 neospeech.init.d -rwxr-xr-x 1 puppet puppet 1172424 Dec 21 10:51 vwmrcpd -rw-r--r-- 1 puppet puppet4070 Jan 12 17:26 vwmrcpsrv.ini ./manifests: total 16 -rw-r--r-- 1 puppet puppet 740 Feb 9 13:24 config.pp -rw-r--r-- 1 puppet puppet 80 Jan 12 17:25 init.pp -rw-r--r-- 1 puppet puppet 2809 Feb 9 12:18 install.pp -rw-r--r-- 1 puppet puppet 2793 Jan 12 17:03 save.orig Here is the debug output from my puppet agent run [root@node12 ~]# puppet agent --debug --test debug: Failed to load library 'shadow' for feature 'libshadow' debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Failed to load library 'selinux' for feature 'selinux' debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: Failed to load library 'ldap' for feature 'ldap' debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/certs/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/ var/lib/puppet/state] debug: /File[/var/lib/puppet/state/resources.txt]: Autorequiring File[/ var/lib/puppet/state] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/private_keys/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/classes.txt]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/ lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/ lib/puppet] debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/public_keys/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/ puppet/ssl] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/ var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/ puppet/ssl] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/ lib/puppet/state] debug: /File[/var/run/puppet/agent.pid]: Autorequiring File[/var/run/ puppet] debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/ var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/ puppet/ssl] debug: Finishing transaction 23934315968580 debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/ lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/
Re: [Puppet Users] Cache for the local system while offline
On Thu, Feb 9, 2012 at 06:12, mukulm smilemukul2...@gmail.com wrote: I want to cache the updates for the users system received from the server so that the users can get the updates from the local system cache while offline. Any idea how can server updates be stored on the users system while offline ? You likely want `--usecacheonfailure`, or the equivalent setting in `puppet.conf`: http://docs.puppetlabs.com/references/stable/configuration.html#usecacheonfailure Whether to use the cached configuration when the remote configuration will not compile. This option is useful for testing new configurations, where you want to fix the broken configuration rather than reverting to a known-good one. That should also apply when you can't communicate with the master. -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] How to add Node Description as extra column in table overview
On Thu, Feb 9, 2012 at 01:18, Dig Deeper deeepdig...@googlemail.com wrote: I have about 20+ nodes managed with Puppet, and they all have names like xyz-123. I added a description to each of them (e.g. like test build server, production DB 1, etc.). Now what I would like, is to have these description strings displayed in the dashboard tables (e.g. All, Unresponsive, etc.) as an extra column next to Node name. This would help in identifying much quicker whats going on, or whats wrong. Any way to enable that? No, not as part of the product. You could obviously patch Dashboard, which wouldn't be impossibly hard, but it isn't in by default. You could also file a feature request asking that it be added, which helps let the folks working on that product know what you care about. -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Strange behavior by service
On 02/09/2012 11:39 AM, Daniel Pittman wrote: I would try adding ensure = undef to the service's parameters. If that doesn't work then I can't imagine what would. Thanks John, that did the trick. I'm not sure if I've got a service default set somewhere I didn't realize or what but at least now it's doing the right thing. Thanks, John, indeed. I hoped to find a bit more time to dig in and understand exactly why, but my intuition is that we have a default of `ensure = true` for anything that doesn't explicitly mention the value. For a service that is the equivalent of `ensure = running`, which would explain the behaviour you saw. For most types that is the right thing to do, if the user is trying to manage something about it. If so it's not well covered in the Type docs. I tested this class under 2.6.x previously and did not experience this issue so it may be a 2.7.x change. A lot has changed about our environment since then so I can't definitively point at anything but if it's a change in the Puppet default value for 'ensure' then the docs should be updated to reflect that. Currently the type docs for 2.7.9 have the following to say about setting 'ensure' on a service: ensure Whether a service should be running. Valid values are stopped (also called false), running (also called true). -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Questions regarding Puppet with httpd.conf
On Wed, Feb 8, 2012 at 3:46 PM, the_fonz tim_stockf...@hotmail.com wrote: Hi, I'd like to start using Puppet to manage an httpd.conf file across several webservers. Others have already correctly steered you towards templates for this sort of thing, but I have one aside... each httpd.conf file has multiple Virtual Host entries that are defined by the webservers IP. VirtualHost 10.3.200.131:80 for example. Just like to point out that, unless you have specific reason for binding apache only to one interface, it's perfectly acceptable to throw wildcards in to these declarations (ie. software virtual hosting versus hardware). It has the added effect of simplifying configurations (though, as I hinted at previously, there may be other security related implications or similar that prevents you from doing this sort of thing). -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Why are not the reports uploading?
The silly question... that's in the agent's puppet.conf, not just in the agent section of the puppet.conf on the puppet master? Have you restarted the server and agents? Do you see anything written to /var/lib/puppet/reports at all? Is it writable by the puppet user? Do you see any obvious errors in any of the logs? Do you see the reports being posted to /var/lib/puppet/log/masterhttp.log? On Wed, Feb 8, 2012 at 1:53 PM, Peter Berghold salty.cowd...@gmail.comwrote: That's in there. Each of the hosts running the agent already have that in there... On Wed, Feb 8, 2012 at 4:27 PM, Russell Van Tassell russel...@gmail.comwrote: Immediately before that, did you miss the agent configuration? # puppet.conf (on each agent) [agent] report = true On Wed, Feb 8, 2012 at 1:16 PM, Peter Berghold salty.cowd...@gmail.comwrote: Hi folks, After installing dashboard after follwing the instructions here: http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html I find that the reports are not uploading. In my puppet.conf the [master] section has the following: # Dashboard stuff reports = store, html reporturl = http://206.217.196.46:3000/reports/upload puppet version is: 2.7.10 Neither the output from the webbrick server show the uploads happening nor the generated web page. I have the delayed job processors running and I'm beginning to think I've lost my mind... -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Puppet master can not find file_metadata for my puppet module
Thanks. That was my problem. On Feb 9, 3:14 pm, Denmat tu2bg...@gmail.com wrote: Hi, You've got a typo for your source name. puppet:///modules/neospeech/vmwrcpd at /etc/puppet/modules/neospeech/manifests/config.pp:12 notice: -rwxr-xr-x 1 puppet puppet 1172424 Dec 21 10:51 vwmrcpd puppet:///modules/neospeech/vmwrcpd Cheers Den On 10/02/2012, at 6:53, Duain Christensen duain.christen...@gmail.com wrote: Hello, I am running a puppet master version 2.7.5 on Centos 5.7 and a puppet agent version 2.7.5. I am simply trying to apply changes to files by defining a file resource in my manifest. When I execute my puppet agent to do the installation it complains it can not find the file meta data. Here is my manifest. class neospeech::config { file { /usr/vwmrcpd/vwmrcpd/vwmrcpd: owner = root, group = root, mode = 755, source = puppet:///modules/neospeech/vmwrcpd, require = Class[neospeech::install], } file { /usr/vwmrcpd/ini/vwmrcpsrv.ini: owner = root, group = root, mode = 644, source = puppet:///modules/neospeech/vmwrcpsrv.ini, require = Class[neospeech::install], } exec { service neospeech start: path = /sbin:/bin:/usr/bin:/usr/sbin, command = service neospeech start, subscribe = File[/usr/vwmrcpd/vwmrcpd/vwmrcpd], refreshonly = true, require = Class[neospeech::install], } } here is my directory structure under my puppet modules directory [root@puppet neospeech]# pwd /etc/puppet/modules/neospeech [root@puppet neospeech]# ls -lR .: total 8 drwxr-xr-x 2 puppet puppet 4096 Feb 9 12:47 files drwxr-xr-x 2 puppet puppet 4096 Feb 9 13:49 manifests ./files: total 1160 -rw-r--r-- 1 puppet puppet 768 Feb 9 12:46 neospeech.init.d -rwxr-xr-x 1 puppet puppet 1172424 Dec 21 10:51 vwmrcpd -rw-r--r-- 1 puppet puppet 4070 Jan 12 17:26 vwmrcpsrv.ini ./manifests: total 16 -rw-r--r-- 1 puppet puppet 740 Feb 9 13:24 config.pp -rw-r--r-- 1 puppet puppet 80 Jan 12 17:25 init.pp -rw-r--r-- 1 puppet puppet 2809 Feb 9 12:18 install.pp -rw-r--r-- 1 puppet puppet 2793 Jan 12 17:03 save.orig Here is the debug output from my puppet agent run [root@node12 ~]# puppet agent --debug --test debug: Failed to load library 'shadow' for feature 'libshadow' debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Failed to load library 'selinux' for feature 'selinux' debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: Failed to load library 'ldap' for feature 'ldap' debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/certs/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/ var/lib/puppet/state] debug: /File[/var/lib/puppet/state/resources.txt]: Autorequiring File[/ var/lib/puppet/state] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/private_keys/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/classes.txt]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/ lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/ lib/puppet] debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/ssl/public_keys/node12.localdomain.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/ puppet/ssl] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/ var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/ puppet/ssl] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/ lib/puppet/state] debug: /File[/var/run/puppet/agent.pid]: Autorequiring File[/var/run/ puppet] debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state] debug:
[Puppet Users] hiera failed dependencies
Hi all. Even though hiera is working for my manifests (does what it should) the agents are complaining in their logs. http://pastebin.com/PKQDfPmN Can anyone suggest what might be going on? TIA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] hiera failed dependencies
Do you have an example of the code that's being run? Are you just starting to play with Hiera, or did you suddenly have issues? Are the permissions set correctly on the hiera-puppet module on your Master? I think we need a bit more information here about how you have this setup. On Thu, Feb 9, 2012 at 3:20 PM, Berry Sizemore berry.sizem...@gmail.comwrote: Hi all. Even though hiera is working for my manifests (does what it should) the agents are complaining in their logs. http://pastebin.com/PKQDfPmN Can anyone suggest what might be going on? TIA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: hiera failed dependencies
I found the problem. The pluginsync was not in [main]. Thanks. On Feb 9, 3:24 pm, Gary Larizza g...@puppetlabs.com wrote: Do you have an example of the code that's being run? Are you just starting to play with Hiera, or did you suddenly have issues? Are the permissions set correctly on the hiera-puppet module on your Master? I think we need a bit more information here about how you have this setup. On Thu, Feb 9, 2012 at 3:20 PM, Berry Sizemore berry.sizem...@gmail.comwrote: Hi all. Even though hiera is working for my manifests (does what it should) the agents are complaining in their logs. http://pastebin.com/PKQDfPmN Can anyone suggest what might be going on? TIA -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] puppetd hanging on some nodes
On Thu, Feb 9, 2012 at 5:08 PM, Gonzalo Servat gser...@gmail.com wrote: Damn. Well, at least we eliminated one possible cause. Is there any chance you can run with `--debug` enabled on one of the failed machines, and see if that points to the right place? Otherwise we have to start to get into some fairly heavy ways to figure out what is going on. OK I'm now running it with --debug into separate log files, to compare a working and non-working runs. Unfortunately the hung Puppet doesn't seem to reveal anything interesting in the logs. A working puppet run looks like this: [..snip..] Hi Daniel, I'm having an increasing number of nodes now with puppet hangs. I now have 26 nodes where puppetd just hangs. Any ideas on what I can try? I've tried removing any Puppet configuration for the hanging nodes, but it doesn't help so it looks like a client side problem and not the catalog that gets applied to them. Kernel on hanging nodes: 2.6.32-131.17.1.el6.x86_64. It would be nice if all the nodes running the above kernel had this problem, but unfortunately there are other nodes using the above kernel that are not hanging. Thanks in advance. Gonzalo -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Example42 MySQL puppet-module
Hi there, I thought I understood how this module works, but I guess I missed something. Here is what I have in my nodes.pp node 'mysql' inherits default { include mysql mysql::user { db1: mysql_password_hash = db1, mysql_user = db1, mysql_host = % } mysql::grant { db1: mysql_privileges = ALL, mysql_password = password, mysql_db = db1, mysql_user = db1, mysql_host = % } } That works perfectly. What I want to do is expand this to be able to setup additional users and grants. I thought adding more lines for mysql::user mysql::grant to do more users. Any suggestions how I do this? I'm at a bit of a loss how to handle multiple users and grants. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Hiera data unusable in a class with an array parameter
Given the following hiera hash: common.yaml: --- *allowed_ips:* * First IP: 1.2.3.4* * Second IP: 5.6.7.8* and the module: *class iptables ($role) {* * file {/tmp/test:* *content = template(iptables/test.erb)* * }* *}* with the corresponding template test.erb: *% role.each do |role| -% * * code* *% end %* *% scope.function_hiera('allowed_ips').each do |comment, ip| -% * * code %= ip % code # %= comment %* *% end %* And finally calling them in the node: *node example.com {* * class {iptables:* *role = [role1, role 2]* * }* *}* The above configuration gives the following error: Error 400 on SERVER: Failed to parse template iptables/test.erb: can't convert Array into String at .../iptables/manifests/init.pp:3 on node example.com The weird part is that taken individually (either using only the role array or only the hiera hash) they work perfectly. But when I combine them in the same template I get the above error. And it doesn't have to be necessarily a hiera hash or inside a template. Any hiera data called from a class with an array p*arameter. * Am I doing something wrong? It might be a bug but I want to first make sure that I am using this the right way. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AKM_WbSvMAsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
What you want is the hiera_array instead of hiera function. There's also a hiera_hash function. Thanks Nan On Feb 9, 2012, at 19:49, Vlad v...@vladgh.com wrote: Given the following hiera hash: common.yaml: --- *allowed_ips:* * First IP: 1.2.3.4* * Second IP: 5.6.7.8* and the module: *class iptables ($role) {* * file {/tmp/test:* *content = template(iptables/test.erb)* * }* *}* with the corresponding template test.erb: *% role.each do |role| -% * * code* *% end %* *% scope.function_hiera('allowed_ips').each do |comment, ip| -% * * code %= ip % code # %= comment %* *% end %* And finally calling them in the node: *node example.com {* * class {iptables:* *role = [role1, role 2]* * }* *}* The above configuration gives the following error: Error 400 on SERVER: Failed to parse template iptables/test.erb: can't convert Array into String at .../iptables/manifests/init.pp:3 on node example.com The weird part is that taken individually (either using only the role array or only the hiera hash) they work perfectly. But when I combine them in the same template I get the above error. And it doesn't have to be necessarily a hiera hash or inside a template. Any hiera data called from a class with an array p*arameter. * Am I doing something wrong? It might be a bug but I want to first make sure that I am using this the right way. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AKM_WbSvMAsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] opensource VPN modules
Hey there, Do you guys know of opensourced puppet modules for managing VPN services? I've only found a handful of modules for openvpn that seemed less than complete. -- Gabriel Filion -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
Thanks Nan, I've tried them all (hiera, hiera_array and hiera_hash), unfortunately with no luck. Like I mentioned above, it doesn't have to be necessarily a hiera hash. Even a simple var: name inside the yaml file gives that error. As long as you have an array defined as a parameter, together with any type of variable from hiera (string, array, or hash), it doesn't work. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/U6a7O_EwdyYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
Vlad, Have you tried setting the variable inside your Puppet manifest before you call it in the template? Something like: $ips = hiera_hash('allowed_ips') file {/tmp/test: content = template(iptables/test.erb) } And then in the template: *% ips.each do |comment, ip| -% * * code %= ip % code # %= comment %* *% end %* I've not seen too many people calling hiera inside a function - let's eliminate this first and see what happens. On Thu, Feb 9, 2012 at 8:47 PM, Vlad v...@vladgh.com wrote: Thanks Nan, I've tried them all (hiera, hiera_array and hiera_hash), unfortunately with no luck. Like I mentioned above, it doesn't have to be necessarily a hiera hash. Even a simple var: name inside the yaml file gives that error. As long as you have an array defined as a parameter, together with any type of variable from hiera (string, array, or hash), it doesn't work. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/U6a7O_EwdyYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Gary Larizza Professional Services Engineer Puppet Labs -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
try adding this in your template above the call to scope.function_hiera_array(): % Puppet::Parser::Functions.function('hiera_array') -% On 12-02-09 11:47 PM, Vlad wrote: Thanks Nan, I've tried them all (hiera, hiera_array and hiera_hash), unfortunately with no luck. Like I mentioned above, it doesn't have to be necessarily a hiera hash. Even a simple var: name inside the yaml file gives that error. As long as you have an array defined as a parameter, together with any type of variable from hiera (string, array, or hash), it doesn't work. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/U6a7O_EwdyYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Gabriel Filion -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
Thanks Gary and Lelutin. Gary: That was the first thing I tried, and no luck there either. I even took out the template out of the equation and called a simple variable like: common.yaml: *--- **test: testvar* *class test ($role) {* *$ips = hiera('test') **notify {${ips}:}* } No success here either. If I get rid of the $role parameter, it simply works. If I get rid of the hiera lookup, and keep only the role (notify {${role}:}), it works. But not together. Lelutin: I just tested your suggestion but it still doesn't work. I forgot to mention that I have hiera and hiera-puppet gems (0.3.0) plus a checkout of hiera-puppet inside my modules folder. And yes all functions are pluginsynced across all agents. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CyfwbFo1lMYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Hudson/Jenkins updating host parameter?
Hello, We have constructed the following class for deploying some_service; class some_service { include platform_common platform_common::deployWarService { 'some_service': repo = our-repo-name, service = $some_service_name, version = $some_service_version, web_context = $some_service_name, undeploy_old_versions = true } } This config has already been applied to machine_a in our development platform. Now we are trying to implement the following use case; 1) Developer commits code changes for some_service 2) Hudson/Jenkins job is triggered, compiles, tests, and generates war artifact for some_service in our maven repository 3) Same Hudson/Jenkins job updates the the some_service_version parameter in our puppetmaster ( this is a host specific parameter ) 4) Puppet runs on machine_a, retrieves new config with some_service_version, retrieves and deploys the new war Can I get suggestions on how to accomplish step 3. I know foreman provides a REST API but it doesn't appear to allow modification of host parameters. Thanks, Mark -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
On Thu, Feb 9, 2012 at 9:09 PM, Vlad v...@vladgh.com wrote: Thanks Gary and Lelutin. Gary: That was the first thing I tried, and no luck there either. I even took out the template out of the equation and called a simple variable like: common.yaml: --- test: testvar class test ($role) { $ips = hiera('test') notify {${ips}:} } No success here either. If I get rid of the $role parameter, it simply works. If I get rid of the hiera lookup, and keep only the role (notify {${role}:}), it works. But not together. Lelutin: I just tested your suggestion but it still doesn't work. I forgot to mention that I have hiera and hiera-puppet gems (0.3.0) plus a checkout of hiera-puppet inside my modules folder. And yes all functions are pluginsynced across all agents. What does your heira.yaml configuration file look like? are you using %{role} in hiera.yaml hierarchy by any chance? Thanks, Nan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: How do I track updates to forge modules?
On 3 February 2012 09:55, John Warburton jwarbur...@gmail.com wrote: Is there a way to watch modules and be notified if they are updated? I can't see anything obvious in the documentation Anyone? Bueller? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hiera data unusable in a class with an array parameter
That fixes it! Thanks. In all my debugging I assumed that can't convert Array into String referred to the hiera variables. And it was about the role variable all along. You were right, I had a top scope variable role defined in a custom fact, which was also in the hiera hierarchy, and another role passed as a parameter to the module. Now I wonder why without hiera they can both live together. Probably the hiera call that resides inside the module gets the local scope for hierarchy and not the global one, so it creates each hierarchical string with an array passed from the parameter. Anyway, thanks for your prompt answer. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/1RKe1u4HztkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] SSL Errors - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B
Hi Felix, thanks for your response to my question. It's taken me a while to get back to this issue but I finally figured it out tonight. I had a old puppetd process running in the background (I'd since moved to using cron to call puppet) that must have been holding open it's old cert files, etc... After I killed the old puppetd process everyting is working as it should. (i.e. no more errors and the correct puppet process is still running as it should). Thanks, Romeo On Mon, Jan 30, 2012 at 07:55, Felix Frank felix.fr...@alumni.tu-berlin.de wrote: Hi, concerning your question why everything seems to work pretty well: On 01/27/2012 04:59 AM, Romeo Theriault wrote: Jan 26 17:09:41 ppt01 puppet-agent[27357]: Using cached catalog Your agent is using a cached catalog. puppet agent --test should fail. Also, changing the manifest for this node should not have any effect until you resolve this problem. My guess is that the agent has an old master certificate stored or somesuch. For some reason it regards your current master cert as invalid. The simplest approach may be to scrutinize the local /var/lib/puppet/ssl for certificates that match your master's FQDN (perhaps puppet). If you find several, use openssl x509 to find out how they differ. HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- Romeo -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.