[Puppet Users] How run a first command
Hi, I try exec my first command apt-get update, after install other packages but run first apt-get install and not apt-get update Exec { path = /usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin, } exec { 'apt-get -y update': command = '/usr/bin/apt-get -y update', } package { build-essential: ensure = installed} package { python-psycopg2: ensure = installed} How I can run apt-get update first? -- 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] glassfish application deployment fails
i'm trying to install and deploy glassfish application using puppet in a master agent mode. i'm able to download files from the master and unzip them, configure etc ... the last two steps are to start the glassfish service and deploy war file. i haven't been able to deploy the war file so far as puppet always fails with: err: /Stage[main]/Glassfish::App/Exec[deploy app.war]/returns: change from notrun to 0 failed: /tmp/appdeploy.sh returned 1 instead of one of [0] at /etc/puppet/modules/glassfish/manifests/app.pp: glassfish service starts but the deployment itself fails. The script simply tries to: #!/bin/bash service glassfish start sleep 2 /opt/glassfish3/bin/asadmin deploy --port 4949 --contextroot / /tmp/ app.war I have one simple class class glassfish { file { /tmp/glassfish.zip: source = puppet:///modules/glassfish/glassfish-3.1.1.zip, } exec { unzip glassfish: command = /usr/bin/unzip /tmp/glassfish.zip -d /opt, require = [File[/tmp/glassfish.zip],Package[unzip]], } file { /etc/init.d/glassfish: source = puppet:///modules/glassfish/glassfish, mode = 755, owner = root, group = root, } exec { add initscript glassfish: command = /sbin/chkconfig --level 35 glassfish on, require = File[/etc/init.d/glassfish], } file { /tmp/app.war: source = puppet:///modules/glassfish/app.war, } file { /tmp/appdeploy.sh: source = puppet:///modules/glassfish/appdeploy.sh, } exec { deploy app.war: command = /tmp/appdeploy.sh, require = [File[/tmp/app.war],File[/tmp/appdeploy.sh]], } } if i execute the script manually after puppet has failed it deploys the app successfully. i'm running puppet-2.7.9-1.el5.rf.noarch on centos 5.4 and jdk is jdk-1.6.0_22-fcs. i'm relatively new to puppet but thought this should've worked? Thanks. -- 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: inherits from parametrized class
2012/2/15 jcbollinger john.bollin...@stjude.org On Feb 14, 10:41 am, Nan Liu n...@puppetlabs.com wrote: On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov ruslan.usi...@gmail.com wrote: Hello In is possible inherits from parametrized class?? Is class inheritance really would you should be using? If your intention is for the child class to override properties of resources declared by the parent class, then yes; otherwise no. From your example it appears no resource overriding is intended, so probably no. I think yes, for example i use in linux::php52, follow service definition service { php-fpm: require = [ File[/usr/local/etc/php-fpm.conf], Package[php52], File[/var/log/php-fpm/], File[/etc/init.d/php-fpm] ]; } and in derived class i want for standalone(linux::php52::standalone) configuration restart service when config files changed like this: Service[php-fpm] { ensure = true, enable = true, hasrestart = true, subscribe = [ File[/usr/local/etc/php-fpm.conf], File[/usr/local/etc/php.ini], File[/etc/init.d/php-fpm], Package[php52] ]; } and in cluster class do nothing(restart of php will be made by cluster stack) like this: Service[php-fpm] { enable = false } How cant accomplish this be composition? I would be very grateful It looks like what you're really looking for is class composition, and that's exactly the solution that Nan proposed to you. Do not use inheritance to achieve composition. It's not currently possible, and I don't know if it's 100% clear when you inherit and add parameters do you intend inherit the parent's default, override the parent's default, or to pass new parameters. And this is one of the lesser reasons to avoid parameterizing your classes. 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. -- 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 run a first command
Hi, There are at least two simple options for you: require = Or before = package { build-essential: ensure = installed, require = Exec[ 'apt-get -y update'] There are other ordering methods too. I suggest you start here for some good examples. http://docs.puppetlabs.com/learning/ordering.html Den On 17/02/2012, at 19:30, Jair Gaxiola jyr.gaxi...@gmail.com wrote: Hi, I try exec my first command apt-get update, after install other packages but run first apt-get install and not apt-get update Exec { path = /usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin, } exec { 'apt-get -y update': command = '/usr/bin/apt-get -y update', } package { build-essential: ensure = installed} package { python-psycopg2: ensure = installed} How I can run apt-get update first? -- 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] How run a first command
2012/2/17 Jair Gaxiola jyr.gaxi...@gmail.com Hi, I try exec my first command apt-get update, after install other packages but run first apt-get install and not apt-get update Exec { path = /usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin, } exec { 'apt-get -y update': command = '/usr/bin/apt-get -y update', } package { build-essential: ensure = installed} package { python-psycopg2: ensure = installed} Put require meta parameter, шт pakege definition, like this require = Exec[ 'apt-get -y update'] be much better use this: https://github.com/camptocamp/puppet-apt How I can run apt-get update first? -- 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] New Node displays on Dashboard ..just not on live management screen
I am a newbie..so forgive if this is easy question... I have a new node installed and it shows up and gets reports... but will not show up on live management screen in the mcollective.log on that machine I see the following error: INFO -- : stomp.rb:79:in `on_connectfail' Connction to stomp://mcollective@xx failed on attempt n any ideas? -- 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: Could not set present on ensure: Read-only file system
On Feb 16, 2:14 pm, Jair Gaxiola jyr.gaxi...@gmail.com wrote: On Thu, Feb 16, 2012 at 1:28 PM, Denmat tu2bg...@gmail.com wrote: Hi, Is it a read only file system? change from purged to present failed: Could not set 'present on ensure: Read-only file system - /tmp/puppet20120216-1063-18q7lsz-0 at /tmp/vagrant-puppet/manifests/vagrant.pp:15 I have of file system read only, drwxrwxrwt 3 root root 4096 Feb 16 11:43 . drwxr-xr-x 22 root root 4096 Jul 21 2011 .. -rw--- 1 root root 2799 Feb 16 11:49 puppet20120216-1053-1p4uxc-0 -rw--- 1 vagrant vagrant 191 Feb 16 11:43 vagrant-network-entry -rw-r--r-- 1 root root 283 Feb 16 11:43 vagrant-network-interfaces drwxr-xr-x 4 root root 4096 Feb 16 11:43 vagrant-puppet vagrant@lucid32:~$ drwxr-xr-x 4 root root 4096 Feb 16 11:43 . drwxrwxrwt 3 root root 4096 Feb 16 11:43 .. drwxr-xr-x 1 vagrant vagrant 102 Feb 16 11:49 manifests drwxr-xr-x 1 vagrant vagrant 238 Feb 15 15:23 modules-0 vagrant@lucid32:~$ ls -al /tmp/vagrant-puppet/manifests total 8 drwxr-xr-x 1 vagrant vagrant 102 Feb 16 11:49 . drwxr-xr-x 4 root root 4096 Feb 16 11:43 .. -rw-r--r-- 1 vagrant vagrant 1444 Feb 16 10:32 vagrant.pp I run sudo dpkg --configure -a from console returns: dpkg: unable to access dpkg status area: Read-only file system You have misunderstood Denmat's question, though it was really a statement presented in question form. Your tools are telling you that the *filesystem* is read-only. That has nothing to do with the permission bits for individual files, and everything to do with how the filesystem in question (apparently the root filesystem on the affected node) is mounted. You will find, I predict, that you cannot modify the filesystem by any means, including such trivial commands as touch /tmp/foo. Since it seems unlikely to be itentional for the root filesystem to be monuted read-only during normal system operation, you should do two things: 1) Figure out why it is mounted read-only 2) Fix the problem and remount the filesystem read-write You might be able to achieve all that by simply rebooting the system (cleanly, if possible). For what it's worth, the only time I have ever had a filesystem unexpectedly transition from read/write to read-only happened when the system detected filesystem errors during normal operation. It remounted the filesystem read-only to prevent (further) filesystem damage. I quickly discovered that the system had a failing memory module, which was probably the root cause of the episode. 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.
Re: [Puppet Users] Augeas question ab
On 15/02/12 08:10, Steve Shipway wrote: This is only a guess, but is Augeas doing a STRING comparison of the values instead of a NUMERICAL one? String-wise, 7000 80 but numerically it's the other way around. Can you try setting the current value to '1' and see if Augeas wants to change it to 784009728. If it does, then that's the issue. As to WHY it would be doing a string-wise comparison, I don't know. It could be down to the version of Augeas or the Puppet agent. Try upgrading to the latest and test it again... I'm pretty sure you're right with this. From a quick look at the code, then it's simply not designed to work with integer values in settings. You'd need to file an RFE against Puppet for this, as the conditionals are implemented in the provider (not part of Augeas at all). -- Dominic Cleal Red Hat Consulting m: +44 (0)7817 878113 -- 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: About puppet report
I don't know if there is a warning tag in puppet by default, but I would try using the specific error tag in your tagmail.conf err: m...@email.tld You could also try setting all: m...@email.tld to test if your puppetmaster can send report emails at all. P.S. I had to restart my puppetmaster (apache httpd in my case) to get the modified tagmail.conf to 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/-/vbMNU16sdxYJ. 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: glassfish application deployment fails
turned out to be an invalid glassfish domain.xml file. please ignore. On Thu, Feb 16, 2012 at 11:54 PM, george pitich georgepit...@gmail.comwrote: i'm trying to install and deploy glassfish application using puppet in a master agent mode. i'm able to download files from the master and unzip them, configure etc ... the last two steps are to start the glassfish service and deploy war file. i haven't been able to deploy the war file so far as puppet always fails with: err: /Stage[main]/Glassfish::App/Exec[deploy app.war]/returns: change from notrun to 0 failed: /tmp/appdeploy.sh returned 1 instead of one of [0] at /etc/puppet/modules/glassfish/manifests/app.pp: glassfish service starts but the deployment itself fails. The script simply tries to: #!/bin/bash service glassfish start sleep 2 /opt/glassfish3/bin/asadmin deploy --port 4949 --contextroot / /tmp/ app.war I have one simple class class glassfish { file { /tmp/glassfish.zip: source = puppet:///modules/glassfish/glassfish-3.1.1.zip, } exec { unzip glassfish: command = /usr/bin/unzip /tmp/glassfish.zip -d /opt, require = [File[/tmp/glassfish.zip],Package[unzip]], } file { /etc/init.d/glassfish: source = puppet:///modules/glassfish/glassfish, mode = 755, owner = root, group = root, } exec { add initscript glassfish: command = /sbin/chkconfig --level 35 glassfish on, require = File[/etc/init.d/glassfish], } file { /tmp/app.war: source = puppet:///modules/glassfish/app.war, } file { /tmp/appdeploy.sh: source = puppet:///modules/glassfish/appdeploy.sh, } exec { deploy app.war: command = /tmp/appdeploy.sh, require = [File[/tmp/app.war],File[/tmp/appdeploy.sh]], } } if i execute the script manually after puppet has failed it deploys the app successfully. i'm running puppet-2.7.9-1.el5.rf.noarch on centos 5.4 and jdk is jdk-1.6.0_22-fcs. i'm relatively new to puppet but thought this should've worked? Thanks. -- 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 unless behaviour with a dependency
On Feb 17, 4:19 pm, R.I.Pienaar r...@devco.net wrote: - Original Message - From: jimbob palmer jimbobpal...@gmail.com To: puppet-users@googlegroups.com Sent: Friday, February 17, 2012 3:12:46 PM Subject: [Puppet Users] Puppet unless behaviour with a dependency Is this really expected behaviour? Should the second Exec succeed even if the first never runs? exec { one: command = /bin/true, unless = '/bin/false' } exec { two: command = /bin/true, require = Exec[one], } I think this ishttps://projects.puppetlabs.com/issues/5876 i think this is a major failure of Puppet to honour what people expect and what the language suggests in the choice of meta param names etc but there's some debate in that ticket It's causing me a real headache. I need to run an expensive command if a string is not present in a file. If the string is present, I abort. That expensive command finishes by writing the string to the file. If the expensive command runs I need to run a second command, which is also expensive to run. How can I do this? If I duplicate the unless the second command can never run since the string will be present in the file. -- 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 unless behaviour with a dependency
On Feb 17, 4:41 pm, jimbob palmer jimbobpal...@gmail.com wrote: On Feb 17, 4:19 pm, R.I.Pienaar r...@devco.net wrote: - Original Message - From: jimbob palmer jimbobpal...@gmail.com To: puppet-users@googlegroups.com Sent: Friday, February 17, 2012 3:12:46 PM Subject: [Puppet Users] Puppet unless behaviour with a dependency Is this really expected behaviour? Should the second Exec succeed even if the first never runs? exec { one: command = /bin/true, unless = '/bin/false' } exec { two: command = /bin/true, require = Exec[one], } I think this ishttps://projects.puppetlabs.com/issues/5876 i think this is a major failure of Puppet to honour what people expect and what the language suggests in the choice of meta param names etc but there's some debate in that ticket It's causing me a real headache. I need to run an expensive command if a string is not present in a file. If the string is present, I abort. That expensive command finishes by writing the string to the file. If the expensive command runs I need to run a second command, which is also expensive to run. How can I do this? If I duplicate the unless the second command can never run since the string will be present in the file. This also doesn't work :( command = /bin/true; /bin/second_command -- 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: Puppet unless behaviour with a dependency
Something like this? exec { second command: refreshonly = true, subscribe = Exec[first command], } -- 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 unless behaviour with a dependency
On Feb 17, 5:12 pm, Adam Heinz a...@metricwise.net wrote: Something like this? exec { second command: refreshonly = true, subscribe = Exec[first command], } Gah! I'm five minutes behind you. It works - THANKS. -- 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] Mac OS X group resource bug?
Hi, I think I may have found a bug in how Mac OS X in handling group resources (I'm still new at this). Using Puppet 2.7.10 and Mac OS X I can create and modify groups without error. I provision... group { 'com.apple.access_ssh': members = ['thisadmin', 'thatadmin'], gid = '509', ensure = 'present' } Then append a single known common user... group { 'com.apple.access_ssh': members = ['thisadmin', 'thatadmin', 'root'], gid = '509', ensure = 'present' } This works under Lion, but not under 10.5. or 10.6. Instead, I receive this error... debug: Puppet::Type::Group::ProviderDirectoryservice: Executing '/usr/ bin/dscl -plist . -read /Groups/com.apple.access_ssh' old and new mismatch! err: /Stage[main]/Mmv2::System::Groups/Group[com.apple.access_ssh]: Could not evaluate: old and new mismatch! at /etc/puppet/modules/mmv2/ manifests/system/groups.pp:11 The error appears to stem from a change to puppet/property.rb, but I'm not sure why. Any pointers? Should I file a bug? Here's the trace... debug: Puppet::Type::Group::ProviderDirectoryservice: Executing '/usr/ bin/dscl -plist . -read /Groups/com.apple.access_ssh' old and new mismatch! /Library/Ruby/Site/1.8/puppet/parameter.rb:165:in `fail' /Library/Ruby/Site/1.8/puppet/property.rb:187:in `insync?' /Library/Ruby/Site/1.8/puppet/property.rb:162:in `safe_insync?' /Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:61:in `perform_changes' /Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:60:in `each' /Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:60:in `perform_changes' /Library/Ruby/Site/1.8/puppet/transaction/resource_harness.rb:133:in `evaluate' /Library/Ruby/Site/1.8/puppet/transaction.rb:49:in `apply' /Library/Ruby/Site/1.8/puppet/transaction.rb:84:in `eval_resource' /Library/Ruby/Site/1.8/puppet/transaction.rb:104:in `evaluate' /Library/Ruby/Site/1.8/puppet/util.rb:476:in `thinmark' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/benchmark.rb:308:in `realtime' /Library/Ruby/Site/1.8/puppet/util.rb:475:in `thinmark' /Library/Ruby/Site/1.8/puppet/transaction.rb:104:in `evaluate' /Library/Ruby/Site/1.8/puppet/transaction.rb:386:in `traverse' /Library/Ruby/Site/1.8/puppet/transaction.rb:99:in `evaluate' /Library/Ruby/Site/1.8/puppet/resource/catalog.rb:141:in `apply' /Library/Ruby/Site/1.8/puppet/configurer.rb:121:in `retrieve_and_apply_catalog' /Library/Ruby/Site/1.8/puppet/util.rb:180:in `benchmark' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/benchmark.rb:308:in `realtime' /Library/Ruby/Site/1.8/puppet/util.rb:179:in `benchmark' /Library/Ruby/Site/1.8/puppet/configurer.rb:120:in `retrieve_and_apply_catalog' /Library/Ruby/Site/1.8/puppet/configurer.rb:151:in `run' /Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run' /Library/Ruby/Site/1.8/puppet/agent/locker.rb:11:in `lock' /Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/sync.rb:230:in `synchronize' /Library/Ruby/Site/1.8/puppet/agent.rb:46:in `run' /Library/Ruby/Site/1.8/puppet/agent.rb:110:in `with_client' /Library/Ruby/Site/1.8/puppet/agent.rb:44:in `run' /Library/Ruby/Site/1.8/puppet/application.rb:172:in `call' /Library/Ruby/Site/1.8/puppet/application.rb:172:in `controlled_run' /Library/Ruby/Site/1.8/puppet/agent.rb:42:in `run' /Library/Ruby/Site/1.8/puppet/agent.rb:85:in `start' /Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb: 95:in `call' /Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb: 95:in `__signal__' /Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb: 95:in `each' /Library/Ruby/Site/1.8/puppet/external/event-loop/signal-system.rb: 95:in `__signal__' (eval):2:in `signal' /Library/Ruby/Site/1.8/puppet/external/event-loop/event-loop.rb:317:in `sound_alarm' /Library/Ruby/Site/1.8/puppet/agent.rb:89:in `start' /Library/Ruby/Site/1.8/puppet/daemon.rb:125:in `start' /Library/Ruby/Site/1.8/puppet/application/agent.rb:364:in `main' /Library/Ruby/Site/1.8/puppet/application/agent.rb:319:in `run_command' /Library/Ruby/Site/1.8/puppet/application.rb:309:in `run' /Library/Ruby/Site/1.8/puppet/application.rb:413:in `hook' /Library/Ruby/Site/1.8/puppet/application.rb:309:in `run' /Library/Ruby/Site/1.8/puppet/application.rb:404:in `exit_on_fail' /Library/Ruby/Site/1.8/puppet/application.rb:309:in `run' /Library/Ruby/Site/1.8/puppet/util/command_line.rb:69:in `execute' /usr/bin/puppet:4 err: /Stage[main]/Mmv2::System::Groups/Group[com.apple.access_ssh]: Could not evaluate: old and new mismatch! at /etc/puppet/modules/mmv2/ manifests/system/groups.pp:11 -- 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
Re: [Puppet Users] Re: Could not set present on ensure: Read-only file system
Is work with run apt-get update first. Thanks a lot. On Fri, Feb 17, 2012 at 7:55 AM, jcbollinger john.bollin...@stjude.org wrote: On Feb 16, 2:14 pm, Jair Gaxiola jyr.gaxi...@gmail.com wrote: On Thu, Feb 16, 2012 at 1:28 PM, Denmat tu2bg...@gmail.com wrote: Hi, Is it a read only file system? change from purged to present failed: Could not set 'present on ensure: Read-only file system - /tmp/puppet20120216-1063-18q7lsz-0 at /tmp/vagrant-puppet/manifests/vagrant.pp:15 I have of file system read only, drwxrwxrwt 3 root root 4096 Feb 16 11:43 . drwxr-xr-x 22 root root 4096 Jul 21 2011 .. -rw--- 1 root root 2799 Feb 16 11:49 puppet20120216-1053-1p4uxc-0 -rw--- 1 vagrant vagrant 191 Feb 16 11:43 vagrant-network-entry -rw-r--r-- 1 root root 283 Feb 16 11:43 vagrant-network-interfaces drwxr-xr-x 4 root root 4096 Feb 16 11:43 vagrant-puppet vagrant@lucid32:~$ drwxr-xr-x 4 root root 4096 Feb 16 11:43 . drwxrwxrwt 3 root root 4096 Feb 16 11:43 .. drwxr-xr-x 1 vagrant vagrant 102 Feb 16 11:49 manifests drwxr-xr-x 1 vagrant vagrant 238 Feb 15 15:23 modules-0 vagrant@lucid32:~$ ls -al /tmp/vagrant-puppet/manifests total 8 drwxr-xr-x 1 vagrant vagrant 102 Feb 16 11:49 . drwxr-xr-x 4 root root 4096 Feb 16 11:43 .. -rw-r--r-- 1 vagrant vagrant 1444 Feb 16 10:32 vagrant.pp I run sudo dpkg --configure -a from console returns: dpkg: unable to access dpkg status area: Read-only file system You have misunderstood Denmat's question, though it was really a statement presented in question form. Your tools are telling you that the *filesystem* is read-only. That has nothing to do with the permission bits for individual files, and everything to do with how the filesystem in question (apparently the root filesystem on the affected node) is mounted. You will find, I predict, that you cannot modify the filesystem by any means, including such trivial commands as touch /tmp/foo. Since it seems unlikely to be itentional for the root filesystem to be monuted read-only during normal system operation, you should do two things: 1) Figure out why it is mounted read-only 2) Fix the problem and remount the filesystem read-write You might be able to achieve all that by simply rebooting the system (cleanly, if possible). For what it's worth, the only time I have ever had a filesystem unexpectedly transition from read/write to read-only happened when the system detected filesystem errors during normal operation. It remounted the filesystem read-only to prevent (further) filesystem damage. I quickly discovered that the system had a failing memory module, which was probably the root cause of the episode. 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. -- SIN ETIQUETAS.[ PUNTO ] http://flavors.me/jyr http://pythoncocoa.com http://opentumblr.com -- 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: Puppet on Windows
On Thu, Feb 16, 2012 at 10:54 PM, Jay Ze iltisannihila...@googlemail.comwrote: Sorry. Wanted to know what shortly means.. not soon ;-) Shortly means by the end of March with that caveat there is a small chance it will not make it into the March release. Hope this helps, -Jeff -- 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: Puppet on Windows
Hi Jay, On Thu, Feb 16, 2012 at 10:32 PM, Jay Ze iltisannihila...@googlemail.comwrote: Thanks for your quick answer. What does soon mean? 1-2 weeks or within the next months? I have a fix in my topic branch: https://github.com/joshcooper/puppet/tree/ticket/2.7.x/11408-remote-recursionCan you try it out and update the ticket with your findings: https://projects.puppetlabs.com/issues/11408 Thanks, Josh -- Josh Cooper Developer, 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] Puppet syntax check for Komodo Edit
I was tried to find syntax highlighting for komodo and did not found it. But i found gepetto that based on eclipse. Try it. On 17.02.2012 21:44, Alexander Fortin wrote: Hi folks, Recently I've been using a MacBook Pro (Lion) as a workstation, I'm feeling good even if still missing some tool (coming from Ubuntu environment). I'd like to have a cross platform IDE with basic Puppet syntax highlight, so far the one that seems to better fit my needs is Komodo Edit v7, that is mentioned here: http://projects.puppetlabs.com/projects/1/wiki/Editor_Tips as a Puppet-supporting one, but I wasn't able to find a module/plugin/whatever that makes it like Puppet DSL syntax. Anyone here using Komodo Edit? Do you have suggestions for better alternatives? Thanks -- 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, Facter and Mcollective
Gary and Greg, wow, thanks a whole lot. I've been reading the same things you typed, in different posts, but for some reason after reading your posts, the light bulb went off and almost everything came together for me. How do I use facts.d? I understand what it does, but how can I leverage puppet and facter to Bottom line, it all depends on our requirements. I basically want to be able to query Mcollective based on facts, such as env, site, and application. The place i work uses weblogic and they build out a brand new WLS domain for every application set, so I want to do something like (excuse my pseudo code here, not a developer) if app = MyAppSet1, if site = LA if env=Dev do some action At first I thought I could use custom facts but shot that idea down because of how it distributes to every puppet client. Now that I have read about confine, I maybe able to pull off some combination of confine and group parameters specified in the Puppet Console? I'm going to play with this today and see what I come up with. I think there are a few different ways of pulling off what I need, and I do thank everyone who has put in the time to reply. - Tony On Feb 16, 7:19 pm, Greg greg.b...@gmail.com wrote: As far as I know thats true... One option to limit facts is to use confine to limit where its gets run. For example, here is a fact that is clearly only applicable for Solaris hosts: Facter.add(obpversion) do confine :kernel = :sunos setcode do %x{/usr/sbin/prtconf -V}.chomp.split( )[1] end end Whilst this won't stop it from being downloaded, it will mean that the code will only be run on hosts that meet the requirements. Hope that helps... On Feb 17, 11:23 am, Nan Liu n...@puppetlabs.com wrote: On Thu, Feb 16, 2012 at 3:19 PM, Tony C tonyjch...@gmail.com wrote: I'm not sure if this is the right group or not, but i'll start here. I have Puppet enterprise 2.0, playing around with custom facts. I have noticed that adding a custom fact to any module will distribute that fact to all machines, regardless if they are assigned to that module or not. Is there a way around this, or is this just by design? Gary already pointed out the cron job. I'm not aware of an easy way to perform limited pluginsync, it's either all or nothing. The reason this is not possible, puppet need facts to compile catalog to know what modules belong to a node, and puppet can't compile without facts, so chicken and egg. For example, puppet can't know if it should pluginsync my_fact if it's in my_module with the following code: if $my_fact {include my_module} HTH, 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.
Re: [Puppet Users] Re: Puppet, Facter and Mcollective
Tony, You might want to look at Hiera and doing this INSIDE Puppet instead of MC. MC is awesome for orchestration and ad-hoc triggering of jobs, but it sounds like what YOU want to do is ensure a final state of a machine based on its role, environment, and site. Hiera allows you to specify a hierarchy (such as node-specific, then role, environment, and so on all the way down to a global file that has all your defaults in it) and return data based on the hierarchy that is pertinent to your node. For example, if you wanted to ensure that all App-nodes had Tomcat, you could have Hiera search through the hierarchy for a 'classes' parameter and return an array of ALL the classes that were declared in every level of the hierarchy. At the app-node level of the hierarchy, you would have 'tomcat' returned as a value for the 'classes' parameter. This would allow you to dynamically classify ALL app-nodes to include the tomcat class without having to change a bunch of individual node declarations in Puppet. It would also let you limit/change behavior based on their environment, role, and so on. Does this make sense? Check out the blog post here -- http://puppetlabs.com/blog/first-look-installing-and-using-hiera/ and the repositories at http://github.com/puppetlabs/hiera and http://github.com/puppetlabs/hiera-puppet On Fri, Feb 17, 2012 at 10:47 AM, Tony C tonyjch...@gmail.com wrote: Gary and Greg, wow, thanks a whole lot. I've been reading the same things you typed, in different posts, but for some reason after reading your posts, the light bulb went off and almost everything came together for me. How do I use facts.d? I understand what it does, but how can I leverage puppet and facter to Bottom line, it all depends on our requirements. I basically want to be able to query Mcollective based on facts, such as env, site, and application. The place i work uses weblogic and they build out a brand new WLS domain for every application set, so I want to do something like (excuse my pseudo code here, not a developer) if app = MyAppSet1, if site = LA if env=Dev do some action At first I thought I could use custom facts but shot that idea down because of how it distributes to every puppet client. Now that I have read about confine, I maybe able to pull off some combination of confine and group parameters specified in the Puppet Console? I'm going to play with this today and see what I come up with. I think there are a few different ways of pulling off what I need, and I do thank everyone who has put in the time to reply. - Tony On Feb 16, 7:19 pm, Greg greg.b...@gmail.com wrote: As far as I know thats true... One option to limit facts is to use confine to limit where its gets run. For example, here is a fact that is clearly only applicable for Solaris hosts: Facter.add(obpversion) do confine :kernel = :sunos setcode do %x{/usr/sbin/prtconf -V}.chomp.split( )[1] end end Whilst this won't stop it from being downloaded, it will mean that the code will only be run on hosts that meet the requirements. Hope that helps... On Feb 17, 11:23 am, Nan Liu n...@puppetlabs.com wrote: On Thu, Feb 16, 2012 at 3:19 PM, Tony C tonyjch...@gmail.com wrote: I'm not sure if this is the right group or not, but i'll start here. I have Puppet enterprise 2.0, playing around with custom facts. I have noticed that adding a custom fact to any module will distribute that fact to all machines, regardless if they are assigned to that module or not. Is there a way around this, or is this just by design? Gary already pointed out the cron job. I'm not aware of an easy way to perform limited pluginsync, it's either all or nothing. The reason this is not possible, puppet need facts to compile catalog to know what modules belong to a node, and puppet can't compile without facts, so chicken and egg. For example, puppet can't know if it should pluginsync my_fact if it's in my_module with the following code: if $my_fact {include my_module} HTH, 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. -- 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: inherits from parametrized class
On Feb 17, 3:48 am, ruslan usifov ruslan.usi...@gmail.com wrote: 2012/2/15 jcbollinger john.bollin...@stjude.org On Feb 14, 10:41 am, Nan Liu n...@puppetlabs.com wrote: On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov ruslan.usi...@gmail.com wrote: Hello In is possible inherits from parametrized class?? Is class inheritance really would you should be using? If your intention is for the child class to override properties of resources declared by the parent class, then yes; otherwise no. From your example it appears no resource overriding is intended, so probably no. I think yes, for example i use in linux::php52, follow service definition service { php-fpm: require = [ File[/usr/local/etc/php-fpm.conf], Package[php52], File[/var/log/php-fpm/], File[/etc/init.d/php-fpm] ]; } and in derived class i want for standalone(linux::php52::standalone) configuration restart service when config files changed like this: Service[php-fpm] { ensure = true, enable = true, hasrestart = true, subscribe = [ File[/usr/local/etc/php-fpm.conf], File[/usr/local/etc/php.ini], File[/etc/init.d/php-fpm], Package[php52] ]; } and in cluster class do nothing(restart of php will be made by cluster stack) like this: Service[php-fpm] { enable = false } How cant accomplish this be composition? I would be very grateful If no node uses linux::php52 directly (every node uses either linux::php52::standalone or linux::php52::cluster) then just remove the service declaration from linux::php52 and put separate ones in linux::php52::standalone and linux::php52::cluster. That makes especial sense in this example because the two erstwhile subclasses don't need any Service[php-fpm] property values in common: the require property they both inherit is redundant with the subscribe property that the standalone class provides. Class inheritance is a convenience in certain special circumstances, but only a complication in most. You don't ever need it in any absolute sense. 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] Re: puppet agent test showing error.
On Feb 17, 1:03 am, sam er.sureshprajap...@gmail.com wrote: On Fri, Feb 17, 2012 at 12:08 PM, krish das.srikris...@gmail.com wrote: On Fri, Feb 17, 2012 at 11:50 AM, sam er.sureshprajap...@gmail.com wrote: Is there anyone who can help me ? 1. Why not use maverick repo. Why source? Installing from source is the best method I guess and I've to do it on production boxes with source. Installing from source is inferior to installing via a decent package manager for multiple reasons, among them: 1) Installation from source yields poor documentation of what's actually installed on the system 2) Installation from source limits repeatability -- what options did you enable, which installation paths did you choose, etc. 3) Installation from source offers no real dependency management 4) Software installed from source is difficult to uninstall If you want to build your own software, then go the extra step and package it up for your system's native package manager. It's not that hard. The error It showing is : root@laptop:~# puppet agent --test The interpreter parameter to 'setcode' is deprecated and will be removed in a future version. I don't think that bit is important. notice: /File[/var/lib/puppet/state/last_run_summary.yaml]/content: --- /var/lib/puppet/state/last_run_summary.yaml 2012-02-17 12:25:15.696246117 +0530 +++ /tmp/puppet-file20120217-1720-1hfxuso-0 2012-02-17 12:26:32.295423615 +0530 @@ -1,6 +1,6 @@ --- time: - last_run: 1329461715 + last_run: 1329461792 version: puppet: 2.7.10 config: \ No newline at end of file err: Could not send report: Connection refused - connect(2) That could be your root problem. Do you perchance have a firewall blocking access to the master? err: Could not run Puppet configuration client: Could not retrieve local facts: undefined method `get_uptime' for Facter::Util::Uptime:Module This looks similar: http://stackoverflow.com/questions/3798107/undefined-method-get-uptime-for-facterutiluptimemodule-nomethoderror In that case, the problem was that multiple versions of facter were installed in different places on the system. That, by the way, is a problem that can be avoided by being sure to install software only via packages, and only via a single package manager (gem must be considered a package manager, too). 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] Re: Puppet, Facter and Mcollective
Hey Gary, Thanks for that, I read the link, as well as this article written by you http://puppetlabs.com/blog/the-problem-with-separating-data-from-puppet-code/ I think I have 2 use cases here. I need mcollective to do ad-hoc triggering of jobs and some orchestration based on some criteria, like role, env and site. I also want my puppet manifests to control the state of a machine, after this orchestration based on the criteria used to trigger and ad-hoc job, just as you stated. For example, for mcollective role = tomcat tomcat_installed = no env=dev designated_app = MyApp1 then install Tomcat After the installation, I would want puppet to run, and if those same criteria matches the logic in my puppet manifest, deploy the proper config files needed to power that tomcat, in that site, for that particular application. So I think it comes down to, where do I put the source of truth. If hiera uses yaml in the backend, can I use Hiera's yaml file to power / etc/puppetlabs/mcollective/facts.yaml? I really like the Puppet Console. Easy to setup, easy to use. I think I understand how Hiera works. When doing a search, it will basically look down the chain and return values that will match whatever you asked for, even if that value is not in the immediate level you are searching against. My apologies if I am all over the place. Just really amped to getting this thing off the ground. I feel like I'm right there, I just need to make a decision. On Feb 17, 12:19 pm, Gary Larizza g...@puppetlabs.com wrote: Tony, You might want to look at Hiera and doing this INSIDE Puppet instead of MC. MC is awesome for orchestration and ad-hoc triggering of jobs, but it sounds like what YOU want to do is ensure a final state of a machine based on its role, environment, and site. Hiera allows you to specify a hierarchy (such as node-specific, then role, environment, and so on all the way down to a global file that has all your defaults in it) and return data based on the hierarchy that is pertinent to your node. For example, if you wanted to ensure that all App-nodes had Tomcat, you could have Hiera search through the hierarchy for a 'classes' parameter and return an array of ALL the classes that were declared in every level of the hierarchy. At the app-node level of the hierarchy, you would have 'tomcat' returned as a value for the 'classes' parameter. This would allow you to dynamically classify ALL app-nodes to include the tomcat class without having to change a bunch of individual node declarations in Puppet. It would also let you limit/change behavior based on their environment, role, and so on. Does this make sense? Check out the blog post here --http://puppetlabs.com/blog/first-look-installing-and-using-hiera/and the repositories athttp://github.com/puppetlabs/hieraandhttp://github.com/puppetlabs/hiera-puppet On Fri, Feb 17, 2012 at 10:47 AM, Tony C tonyjch...@gmail.com wrote: Gary and Greg, wow, thanks a whole lot. I've been reading the same things you typed, in different posts, but for some reason after reading your posts, the light bulb went off and almost everything came together for me. How do I use facts.d? I understand what it does, but how can I leverage puppet and facter to Bottom line, it all depends on our requirements. I basically want to be able to query Mcollective based on facts, such as env, site, and application. The place i work uses weblogic and they build out a brand new WLS domain for every application set, so I want to do something like (excuse my pseudo code here, not a developer) if app = MyAppSet1, if site = LA if env=Dev do some action At first I thought I could use custom facts but shot that idea down because of how it distributes to every puppet client. Now that I have read about confine, I maybe able to pull off some combination of confine and group parameters specified in the Puppet Console? I'm going to play with this today and see what I come up with. I think there are a few different ways of pulling off what I need, and I do thank everyone who has put in the time to reply. - Tony On Feb 16, 7:19 pm, Greg greg.b...@gmail.com wrote: As far as I know thats true... One option to limit facts is to use confine to limit where its gets run. For example, here is a fact that is clearly only applicable for Solaris hosts: Facter.add(obpversion) do confine :kernel = :sunos setcode do %x{/usr/sbin/prtconf -V}.chomp.split( )[1] end end Whilst this won't stop it from being downloaded, it will mean that the code will only be run on hosts that meet the requirements. Hope that helps... On Feb 17, 11:23 am, Nan Liu n...@puppetlabs.com wrote: On Thu, Feb 16, 2012 at 3:19 PM, Tony C tonyjch...@gmail.com wrote: I'm not sure if this is the right group or not, but i'll start here. I have Puppet
[Puppet Users] Re: Puppet, Facter and Mcollective
I just read another article in the mcollective-users group and re-read what you put, and see how I have this wrong. Puppet can do everything I need as far as role = tomcat tomcat_installed = no env=dev designated_app = MyApp1 then install Tomcat and the apply the config files. Mcollective should be used for things like, I want to deploy a new app, use mcollective to shutdown these specific servers, deploy and bring them back up, etc etc etc On Feb 17, 1:13 pm, Tony C tonyjch...@gmail.com wrote: Hey Gary, Thanks for that, I read the link, as well as this article written by you http://puppetlabs.com/blog/the-problem-with-separating-data-from-pupp... I think I have 2 use cases here. I need mcollective to do ad-hoc triggering of jobs and some orchestration based on some criteria, like role, env and site. I also want my puppet manifests to control the state of a machine, after this orchestration based on the criteria used to trigger and ad-hoc job, just as you stated. For example, for mcollective role = tomcat tomcat_installed = no env=dev designated_app = MyApp1 then install Tomcat After the installation, I would want puppet to run, and if those same criteria matches the logic in my puppet manifest, deploy the proper config files needed to power that tomcat, in that site, for that particular application. So I think it comes down to, where do I put the source of truth. If hiera uses yaml in the backend, can I use Hiera's yaml file to power / etc/puppetlabs/mcollective/facts.yaml? I really like the Puppet Console. Easy to setup, easy to use. I think I understand how Hiera works. When doing a search, it will basically look down the chain and return values that will match whatever you asked for, even if that value is not in the immediate level you are searching against. My apologies if I am all over the place. Just really amped to getting this thing off the ground. I feel like I'm right there, I just need to make a decision. On Feb 17, 12:19 pm, Gary Larizza g...@puppetlabs.com wrote: Tony, You might want to look at Hiera and doing this INSIDE Puppet instead of MC. MC is awesome for orchestration and ad-hoc triggering of jobs, but it sounds like what YOU want to do is ensure a final state of a machine based on its role, environment, and site. Hiera allows you to specify a hierarchy (such as node-specific, then role, environment, and so on all the way down to a global file that has all your defaults in it) and return data based on the hierarchy that is pertinent to your node. For example, if you wanted to ensure that all App-nodes had Tomcat, you could have Hiera search through the hierarchy for a 'classes' parameter and return an array of ALL the classes that were declared in every level of the hierarchy. At the app-node level of the hierarchy, you would have 'tomcat' returned as a value for the 'classes' parameter. This would allow you to dynamically classify ALL app-nodes to include the tomcat class without having to change a bunch of individual node declarations in Puppet. It would also let you limit/change behavior based on their environment, role, and so on. Does this make sense? Check out the blog post here --http://puppetlabs.com/blog/first-look-installing-and-using-hiera/andthe repositories athttp://github.com/puppetlabs/hieraandhttp://github.com/puppetlabs/hie... On Fri, Feb 17, 2012 at 10:47 AM, Tony C tonyjch...@gmail.com wrote: Gary and Greg, wow, thanks a whole lot. I've been reading the same things you typed, in different posts, but for some reason after reading your posts, the light bulb went off and almost everything came together for me. How do I use facts.d? I understand what it does, but how can I leverage puppet and facter to Bottom line, it all depends on our requirements. I basically want to be able to query Mcollective based on facts, such as env, site, and application. The place i work uses weblogic and they build out a brand new WLS domain for every application set, so I want to do something like (excuse my pseudo code here, not a developer) if app = MyAppSet1, if site = LA if env=Dev do some action At first I thought I could use custom facts but shot that idea down because of how it distributes to every puppet client. Now that I have read about confine, I maybe able to pull off some combination of confine and group parameters specified in the Puppet Console? I'm going to play with this today and see what I come up with. I think there are a few different ways of pulling off what I need, and I do thank everyone who has put in the time to reply. - Tony On Feb 16, 7:19 pm, Greg greg.b...@gmail.com wrote: As far as I know thats true... One option to limit facts is to use confine to limit where its gets run. For example, here is a fact that is clearly only applicable for Solaris
[Puppet Users] Installing Puppet/Facter without sudo/root access
I want to use Puppet and Facter on a machine where I don't have sudo or root access privileges. I won't be using Puppet for anything that requires that level of access, so I should be OK if I can get it on the box. Any advice on how to proceed? Currently the Facter installer complains that it doesn't have privileges for /usr/bin/facter. I assume Puppet will have the same complain about /etc/puppet. Am trying to install Puppet 2.7.6/Facter 1.6.1 from source on SLES 11 in case that matters. -- 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 unless behaviour with a dependency
On Feb 17, 9:19 am, R.I.Pienaar r...@devco.net wrote: - Original Message - From: jimbob palmer jimbobpal...@gmail.com To: puppet-users@googlegroups.com Sent: Friday, February 17, 2012 3:12:46 PM Subject: [Puppet Users] Puppet unless behaviour with a dependency Is this really expected behaviour? Should the second Exec succeed even if the first never runs? exec { one: command = /bin/true, unless = '/bin/false' } exec { two: command = /bin/true, require = Exec[one], } I think this ishttps://projects.puppetlabs.com/issues/5876 No, I don't think this is 5876. That involves an Exec that 'require's a *failing* resource, but which runs anyway because it also 'subscribe's to resources that are applied successfully. This case is quite different: Exec['two'] depends on a resource that *succeeds*, therefore there is no reason why it should not run. The key point here is that the 'unless' and 'onlyif' parameters of an Exec never themselves cause that Exec to fail. Instead, they are among an Exec's ways of determining whether it is already in sync, and a resource that is already in sync succeeds trivially. If the Exec is not already in sync then its command is run, and its success is judged by the return value. i think this is a major failure of Puppet to honour what people expect and what the language suggests in the choice of meta param names etc but there's some debate in that ticket I think 5876 is a real problem, but not so much the issue presented here. People can evidently be taken by surprise, but I rate that a documentation issue. The behavior itself is sensible and desirable. Moreover, the alternative is already available by putting the condition into the command, like so: exec { 'example': command = '/usr/bin/ fail_when_the_command_shouldnt_run /usr/bin/the_command' } As the OP discovered, the alternative can also be achieved via subscribe / notify. 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.
Re: [Puppet Users] Installing Puppet/Facter without sudo/root access
On Fri, Feb 17, 2012 at 1:43 PM, Jeff Sussna j...@ingineering.it wrote: I want to use Puppet and Facter on a machine where I don't have sudo or root access privileges. I won't be using Puppet for anything that requires that level of access, so I should be OK if I can get it on the box. Any advice on how to proceed? Currently the Facter installer complains that it doesn't have privileges for /usr/bin/facter. I assume Puppet will have the same complain about /etc/puppet. Am trying to install Puppet 2.7.6/Facter 1.6.1 from source on SLES 11 in case that matters. You could clone the sources from git in your home directory and then set your RUBYLIB environment variable to look in those cloned directories and adjust $PATH accordingly. That would probably be easier than trying to use a package that assumes root rights. -- 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] Installing Puppet/Facter without sudo/root access
On Feb 17, 2012, at 3:10 PM, Michael Stahnke stah...@puppetlabs.com wrote: On Fri, Feb 17, 2012 at 1:43 PM, Jeff Sussna j...@ingineering.it wrote: I want to use Puppet and Facter on a machine where I don't have sudo or root access privileges. I won't be using Puppet for anything that requires that level of access, so I should be OK if I can get it on the box. Any advice on how to proceed? Currently the Facter installer complains that it doesn't have privileges for /usr/bin/facter. I assume Puppet will have the same complain about /etc/puppet. Am trying to install Puppet 2.7.6/Facter 1.6.1 from source on SLES 11 in case that matters. You could clone the sources from git in your home directory and then set your RUBYLIB environment variable to look in those cloned directories and adjust $PATH accordingly. That would probably be easier than trying to use a package that assumes root rights. The ext/envpuppet script should help run directly from source as well. I use it to hack on the puppet code base and work on module plugins. -Jeff -- 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: Question about reusing classes/modules
http://www.craigdunn.org/2011/10/puppet-configuration-variables-and-hiera/ Hiera it is! Exactly what I needed. i just need a bit more explaining. On Feb 11, 5:48 pm, Eric Shamow e...@puppetlabs.com wrote: I would avoid this approach - global variables aren't a good idea. Hiera would be a better approach: http://www.devco.net/archives/2011/06/05/hiera_a_pluggable_hierarchic...http://www.devco.net/archives/2011/06/06/puppet_backend_for_hiera.php -Eric -- Eric Shamow Professional Serviceshttp://puppetlabs.com/ (c)631.871.6441 On Saturday, February 11, 2012 at 7:08 PM, krish wrote: My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each of these environments lives in 2 sites, LA and NY. I have 5 applications that are site and env specific. I want to use puppet to template-ize the config files that is required for each env, per site, per app, so 40 files. The config file is basically key=value pairs. Here's a simple example of what each file may look like: site=LA env=Dev app=App1 masterServer=host1 clientServer1=host2 clientServer2=host3 How about having these key value pairs in site.pp with a case environment Then they become global to all modules. -- Krish olindata.com (http://olindata.com) -- 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 athttp://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.