OK. I thought I would start by looking at how cron.rb in the puppet lib/type works because what I''m trying to accomplish is similar. However, when looking through that, it wasn''t immediately obvious to me how or when the resulting cron file was getting written out. Is this getting stored up in some instance var or something? Maybe getting sent to standard out and some other part of the application manages that? Please be gentle, cause I''m still fairly new to ruby. :) Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Try looking at: lib/puppet/provider/cron/crontab.rb In the current trunk. -jason On 7/16/07 12:39 PM, "barsalou" <barjunk@attglobal.net> wrote:> OK. I thought I would start by looking at how cron.rb in the puppet > lib/type works because what I''m trying to accomplish is similar. > > However, when looking through that, it wasn''t immediately obvious to me > how or when the resulting cron file was getting written out. > > Is this getting stored up in some instance var or something? Maybe > getting sent to standard out and some other part of the application > manages that? > > Please be gentle, cause I''m still fairly new to ruby. :) > > Mike B. > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users
On Jul 16, 2007, at 2:39 PM, barsalou wrote:> OK. I thought I would start by looking at how cron.rb in the puppet > lib/type works because what I''m trying to accomplish is similar. > > However, when looking through that, it wasn''t immediately obvious > to me > how or when the resulting cron file was getting written out. > > Is this getting stored up in some instance var or something? Maybe > getting sent to standard out and some other part of the application > manages that?For any resource type that has providers, all of the work is actually done by the providers. As Jason mentioned, the crontab provider in providers/cron/crontab.rb handles the work in this case. Note, however, that it relies heavily on providers/parsedfile.rb to do all of the file reading and writing.> Please be gentle, cause I''m still fairly new to ruby. :)Make sure you check out the ProviderDevelopment wiki page. -- The remarkable thing about Shakespeare is that he really is very good, in spite of all the people who say he is very good. -- Robert Graves --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Quoting Luke Kanies <luke@madstop.com>:> On Jul 16, 2007, at 2:39 PM, barsalou wrote: > >> OK. I thought I would start by looking at how cron.rb in the puppet >> lib/type works because what I''m trying to accomplish is similar. >> >> However, when looking through that, it wasn''t immediately obvious >> to me >> how or when the resulting cron file was getting written out. >> >> Is this getting stored up in some instance var or something? Maybe >> getting sent to standard out and some other part of the application >> manages that? > > For any resource type that has providers, all of the work is actually > done by the providers. As Jason mentioned, the crontab provider in > providers/cron/crontab.rb handles the work in this case. >Thanks Jason & Luke. Slowly I plod along. :)> Note, however, that it relies heavily on providers/parsedfile.rb to > do all of the file reading and writing. > >> Please be gentle, cause I''m still fairly new to ruby. :) > > Make sure you check out the ProviderDevelopment wiki page. >More good information. Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.