[Puppet Users] Re: Skipping Tags?
Doug, We've been successful with software deployments and Puppet has done a great job. We deploy to Tomcat, JBoss, Coldfusion and Apache web sited. In some cases we've needed to tie in a shell script which were nearly impossible to get right in Puppet. One of the keys to your question was that we created a "releases" directory and touch a file with the software release number embedded in the name. The release number is defined in a puppet config and the process runs OnlyIf the file doesn't exist. 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: How to use notify to invoke something prior to a change
Nan - that is an interesting approach to call Puppet from Puppet. I'll have to give that a try and experiment. 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: exec onlyif not working properly
I believe your issue is that your grep command will ALWAYS return 0 since it will see it's one process in the process list. You must add a second grep to ignore it. Try the following: unless => "/bin/ps -aux |/usr/bin/grep '/data/service' | grep -v grep" -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: service start/stop
And adding to Craig's comment, you should "sudo su -" to root in order to run the service script in same fashion as Puppet will. Sometimes the user environment is setup differently (i.e. JAVA_HOME). 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: Custom fact question
The Fact will get downloaded ahead of the manifest being compiled. You just need to add a require => Service[myservice] to the config file. 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: How to query other classes/defines configurations in the same node?
Case 1: I have gone to a model where I have a manifests/conf directory akin to /etc which contains the configuration for each service and application. In your case I would have a zabbix_conf class and in the node, I would simple reference the var $zabbix_conf::server_ip. The beauty of this is my clients know to just go to the conf dir to make config changes. Case 2: I run into this one often and simply get around it with a defined test: if ! defined File[/foo] { file { ...} } In some other situations I use virtual resources such as for application/services users. I again have a Conf file that defines the resource and later realize it. class users { @user { 'jboss': } } Then in various places I can safely instanciate the resource: realize users::user['jboss'] Case 3: A) utilize storedconfigs. B) create a function that is called by the node on each update which writes to the puppet file server directory. The dynamic content can be passed to the function using the template or inline_template functions. HTH. 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: pluginsync before catalogue?
Hey John, I've been using environments quite some time with lots of success. I love the idea of creating a bootstrap environment which I never thought of. This gave me an idea to address an issue I'm trying to tackle. A client s using Puppet for their app setup/deployment. We provide the sysops management. We need to isolate app from ops so what I'm thinking is having a cron job that invoke puppet updates twice passing different environment name (i.e. prod_app or prod_opp). Do you see any problem with that? Also you mentioned issues with environments and how to get around them. Could you elaborate on that? Thanks, 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: Step by step guide to setting user passwords
You can also use the ralsh command where the user is created as long as puppet is installed. The command will spit out the complete user dsl. ralsh user student Also, make sure the password is in single quotes so $ doesn't get interpreted. -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: Is accessing vars from different class safe?
It doesn't sound safe since it sounds like you don't alway install the class. I would lean towards a configuratios class that you can reference to determine if it is or will be installed. I would pass in that value as a parameter to the backup class instead on internally referencing across classes as well. One last thing would be to use a "require config_class" statement before attempting to access the config var. 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: Config files based on rpm version
You could creat a fact that returns the version number of the package installed. Then in the configuration file use Boolean logic to set values and blocks of the config file templates accordingly. Note that there is a puppet function you will need to compare the version strings however I don't know it off the top of my head. 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: pluginsync before catalogue?
John- Thanks for that in-depth feedback. It was great and something to chew on. I'm going to need to evaluate the integrity risk to the isolation requirements of the client to see which practice makes most sense. I do agree that the addition module approach would add to the consistency. It occurred to me that I can have separate source code trees for our own modules there by supporting separate release cycles as well instead of checking the code into the same repo. The Dev team manages 5-6 environments but Ops only has test and production. -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 problem changing values in postfix/main.cf
I have done some further experimenting and found things even more perplexing. The rule is now just adding the new values that I need. The rule is: augeas { "dkim-postfix-settings": require => Package["postfix"], context => "/files/etc/postfix/main.cf", changes => [ "set smtpd_milters inet:localhost:20209", "set non_smtpd_milters inet:localhost:20209", "ins #comment before smtpd_milters", "set #comment[.=''] 'Settings for implementation of DKIM'", ], onlyif => "match smtpd_milters size == 0" } When I run 'puppetd -t' on the client, sometimes it adds the lines into the main.cf configuration file and on subsequent runs it removes it. It is not consistent. I do not understand why it would remove the values. Also when I run puppetd with the --debug switch I see the following: debug: Augeas[dkim-postfix-settings](provider=augeas): Opening augeas with root /, lens path , flags 0 debug: Augeas[dkim-postfix-settings](provider=augeas): Augeas version 0.7.1 is installed debug: Augeas[dkim-postfix-settings](provider=augeas): Will attempt to save and only run if files changed debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/smtpd_milters", "inet:localhost:20209"] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/non_smtpd_milters", "inet:localhost:20209"] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'ins' with params ["#comment", "before", "/files/etc/postfix/main.cf/smtpd_milters "] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/#comment[.='']", "Settings for implementation of DKIM"] debug: Augeas[dkim-postfix-settings](provider=augeas): Files changed, should execute debug: Augeas[dkim-postfix-settings](provider=augeas): Closed the augeas connection debug: //dkim/Augeas[dkim-postfix-settings]: Changing returns debug: //dkim/Augeas[dkim-postfix-settings]: 1 change(s) debug: Augeas[dkim-postfix-settings](provider=augeas): Opening augeas with root /, lens path , flags 0 debug: Augeas[dkim-postfix-settings](provider=augeas): Augeas version 0.7.1 is installed debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/smtpd_milters", "inet:localhost:20209"] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/non_smtpd_milters", "inet:localhost:20209"] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'ins' with params ["#comment", "before", "/files/etc/postfix/main.cf/smtpd_milters "] debug: Augeas[dkim-postfix-settings](provider=augeas): sending command 'set' with params ["/files/etc/postfix/main.cf/#comment[.='']", "Settings for implementation of DKIM"] debug: Augeas[dkim-postfix-settings](provider=augeas): Closed the augeas connection notice: //dkim/Augeas[dkim-postfix-settings]/returns: executed successfully I'm not sure why it is running the commands twice. Please note when it does the two sets of instructions it does add the contents to the main.cf file. When it doesn't, it removes the contents. Here is the output when puppet removes the contents: debug: //liferay_system/File[/etc/postfix/main.cf]/content: Executing 'diff -u /etc/postfix/main.cf /tmp/puppet-diffing.10996.0' --- /etc/postfix/main.cf2010-06-17 14:00:52.0 -0400 +++ /tmp/puppet-diffing.10996.0 2010-06-17 14:01:15.0 -0400 @@ -673,6 +673,3 @@ smtp_sasl_security_options = noplaintext smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination mailbox_size_limit = 25600 -# Settings for implementation of DKIM -smtpd_milters = inet:localhost:20209 -non_smtpd_milters = inet:localhost:20209 debug: //liferay_system/File[/etc/postfix/main.cf]: Changing checksum,content debug: //liferay_system/File[/etc/postfix/main.cf]: 2 change(s) debug: //liferay_system/File[/etc/postfix/main.cf]/checksum: Replacing /etc/postfix/main.cf checksum {md5}61bcd19c95a29f17071c87c23b84579d with {md5}5df8a259e6eaf620fe70d6d4f30442e1 notice: //liferay_system/File[/etc/postfix/main.cf]/checksum: checksum changed '{md5}61bcd19c95a29f17071c87c23b84579d' to '{md5}5df8a259e6eaf620fe70d6d4f30442e1' info: //liferay_system/File[/etc/postfix/main.cf]: Filebucketed /etc/postfix/main.cf to puppet with sum 5df8a259e6eaf620fe70d6d4f30442e1 debug: //liferay_system/File[/etc/postfix/main.cf]/checksum: Replacing /etc/postfix/main.cf checksum {md5}5df8a259e6eaf620fe70d6d4f30442e1 with {md5}61bcd19c95a29f17071c87c23b84579d notice: //liferay_system/File[/etc/postfix/main.cf]/content: content changed '{md5}5df8a259e6eaf620fe70d6d4f30442e1' to 'unknown checksum'
Re: [Puppet Users] Augeas problem changing values in postfix/main.cf
Thanks Patrick! I like the separation of the values being set and adding the comments. That makes complete sense. As for the over-writing of the values, you were absolutely right. The main.cf was being managed by a different class that another Ops engineer had implemented and I was unaware of. I did away with Augeas after detecting that. Regards, 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-us...@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] Strange "Could not evaluate" error on a File resource
I am in the process of upgrading a Tomcat module to support version 7. As such I copied one of the template files and made the slightest change to the filename, from etc-initd-tomcat6 to etc-initd-tomcat7. The permissions and ownership on the files are identical however when invoking Puppet it throws the following error. err: /File[/etc/init.d/tomcat_sso01]: Could not evaluate: Could not retrieve information from environment dev source(s) puppet:///modules/tomcat/etc-initd-tomcat7 I validated that it isn't the contents of the file as I've tried changing the file to only include simple text with no difference. The File code is: file { "/etc/init.d/tomcat_sso01": source => "puppet:///modules/tomcat/etc-initd-tomcat7", mode => 755, owner => root, group => root, ensure => present } If I change the 7 to a 6 in the source line everything works fine. As you can see, the files and permissions are the same. -rw-rw-r-- 1 root root 2848 Nov 15 18:07 etc-sysconfig-tomcat6.erb -rw-rw-r-- 1 root root 2848 Nov 15 18:07 etc-sysconfig-tomcat7.erb I'm running Puppet 2.6.17. I've tried running the server in debug mode but no errors are reported on that side. When running the agent in debug mode it doesn't show anything indicative of a problem: debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson err: /File[/etc/init.d/tomcat_sso01]: Could not evaluate: Could not retrieve information from environment dev source(s) puppet:///modules/tomcat/etc-initd-tomcat7 at /mnt/nas01/puppetmaster/src/lib/dev/tomcat/manifests/defines/app_builder.pp:225 debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson I've been using Puppet for 3 years and have never seen anything like this. Any thoughts? Thanks, John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Strange "Could not evaluate" error on a File resource
Solved the issue. It was simply that I was referencing source instead of template in the File resource. The pre-existing code had scripts in both the files and templates directories, which I didn't realize. I copied the file in the templates directory instead of files. Such a rookie mistake... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.