Al @ Lab42
2010-Dec-02 18:16 UTC
[Puppet Users] How to show a custom message during a puppet run (at certain conditions)
Hi Puppet Masters, I''ve a small problem that would like to solve in a somehow elegant way. I need to install the oci8 module for php without using a pre-made package. The operation involves installing the Oracle client (already done via Puppet), setting Oracle environments (already done via Puppet), installing various php modules and components (done) and executing a command that promtps the user for some data (more precisely the command "pecl install oci8" and then, when prompted, the user has to type something like "instantclient,/opt/instantclient_11_2". Now, please, don''t tell me that I should make a php-oci8 package and distribute it, I know that. Sadly I haven''t found a way to provide what is prompted as an argument to the pecl command and I don''t know how to automate the user input this without some "expect" madness (any usable alternative to automate the reply to a single prompt?). So, since this is an operation that has to be done only on the setup phase on few servers, for me is Ok to leave this step to manual intervention, BUT still I want Puppet to notify (and keep on notyfing) the user unless it finds oci8 ("unless => "pecl info oci8"). I''ve tried with functions like warning or err but I haven''t managed to show their message on the puppet client and inside a resource (in this case I was considering a sort of "fake exec", so that I could use the mentioned uness parameter to check for the extension existence and show the message only when necessary). So, just to be clear. I would like to know, in order of preference: - How to automate in a sane way via pecl the oci8 installation withouth using a package - Or how to show a warning message explaining how to do that manually when the module is not installed. I have the feeling that the answer to the second question is somehow trivial, but somehow not enought for me. Oh, by the way, Puppetmaster is still 0.25 Any help appreciated. Final outcome will be made public on example42.com as (almost) usual. Al -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Avi Miller
2010-Dec-02 23:20 UTC
Re: [Puppet Users] How to show a custom message during a puppet run (at certain conditions)
Al @ Lab42 wrote:> Now, please, don''t tell me that I should make a php-oci8 package and > distribute it, I know that.At the risk of raising your ire, are you aware that Oracle has already made php-oci8 packages: http://oss.oracle.com/projects/php/files/EL5/x86_64/ http://oss.oracle.com/projects/php/files/EL5/source/ Just wanted to make sure you were aware, as I''ve found many who are not. Cheers, Avi -- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
KC Braunschweig
2010-Dec-03 03:52 UTC
Re: [Puppet Users] How to show a custom message during a puppet run (at certain conditions)
I have a similar problem. When trying to have puppet setup a hadoop namenode it may need to format the hdfs if this is a first time install. This requires giving the hadoop namenode -format command a "Y" for each disk being formatted. Ideally in addition to feeding the right prompt response we''d also be able to run external logic to determine if it really is safe to do the format to protect against accidental data loss. Is there something better than an expect script, or worse just piping the yes command at it? KC On Thu, Dec 2, 2010 at 3:20 PM, Avi Miller <avi.miller@gmail.com> wrote:> Al @ Lab42 wrote: >> >> Now, please, don''t tell me that I should make a php-oci8 package and >> distribute it, I know that. > > At the risk of raising your ire, are you aware that Oracle has already made > php-oci8 packages: > > http://oss.oracle.com/projects/php/files/EL5/x86_64/ > http://oss.oracle.com/projects/php/files/EL5/source/ > > Just wanted to make sure you were aware, as I''ve found many who are not. > > Cheers, > Avi > > -- > 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. > 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Al @ Lab42
2010-Dec-03 09:25 UTC
[Puppet Users] Re: How to show a custom message during a puppet run (at certain conditions)
Hardly controlling my ire ( :-) ) I must confess that the server is (sadly) an Ubuntu 10.04... Thanks anyway Af On Dec 3, 12:20 am, Avi Miller <avi.mil...@gmail.com> wrote:> Al @ Lab42 wrote: > > Now, please, don''t tell me that I should make a php-oci8 package and > > distribute it, I know that. > > At the risk of raising your ire, are you aware that Oracle has already > made php-oci8 packages: > > http://oss.oracle.com/projects/php/files/EL5/x86_64/http://oss.oracle.com/projects/php/files/EL5/source/ > > Just wanted to make sure you were aware, as I''ve found many who are not. > > Cheers, > Avi-- 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. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.