Hi, I can''t find a way to add a page on the wiki (i''m logged in but there is no edit button on the facter recipes page), so here is a recipe for DRBD. It has been tested on version 0.8.4. Can someone publish it on the web site? if FileTest.exists?("/proc/drbd") result = {} Thread::exclusive do File.readlines("/proc/drbd").each do |l| if l =~ /(\d+): cs:Unconfigured/ device = $1 result["drbdconnectionstate#{device}"] = "Unconfigured" elsif l =~ /(\d+): cs:(\w+) st:(\w+)\/(\w+) ds:(\w+)\/(\w+)/ device = $1 connectionstate = $2 localstate = $3 peerstate = $4 localdiskstate = $5 peerdiskstate = $6 result["drbdconnectionstate#{device}"] = connectionstate result["drbdlocalstate#{device}"] = localstate result["drbdpeerstate#{device}"] = peerstate result["drbdlocaldiskstate#{device}"] = localdiskstate result["drbdpeerdiskstate#{device}"] = peerdiskstate end end end result.each { |name, fact| Facter.add(name) do setcode do fact end end } end
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 16 July 2007, Sébastien Prud''homme wrote:> I can''t find a way to add a page on the wiki (i''m logged in but there > is no edit button on the facter recipes page), so here is a recipe for > DRBD. It has been tested on version 0.8.4. Can someone publish it on > the web site?Uhm, the recipie pages are actually queries for tagged pages. To add a page, you can just edit the URL (e.g. to http://reductivelabs.com/trac/puppet/wiki/DrbdFacts) and use the "create page" button. Don''t forget to add the tags "facter" and "recipe", so it turns up on the search page. Regards, David PS: Luke, this seems to be a recurring question. Couldn''t you add a little note at the bottom of those pages or even a button "add new" or something like that?> if FileTest.exists?("/proc/drbd") > result = {} > > Thread::exclusive do > File.readlines("/proc/drbd").each do |l| > if l =~ /(\d+): cs:Unconfigured/ > device = $1 > > result["drbdconnectionstate#{device}"] = "Unconfigured" > elsif l =~ /(\d+): cs:(\w+) st:(\w+)\/(\w+) ds:(\w+)\/(\w+)/ > device = $1 > connectionstate = $2 > localstate = $3 > peerstate = $4 > localdiskstate = $5 > peerdiskstate = $6 > > result["drbdconnectionstate#{device}"] = connectionstate > result["drbdlocalstate#{device}"] = localstate > result["drbdpeerstate#{device}"] = peerstate > result["drbdlocaldiskstate#{device}"] = localdiskstate > result["drbdpeerdiskstate#{device}"] = peerdiskstate > end > end > end > > result.each { |name, fact| > Facter.add(name) do > setcode do > fact > end > end > } > end > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users- -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGm1Q7/Pp1N6Uzh0URAhs4AJ9Cxj5ZTEzcE+drdQWtq+7mheL6RwCgmpjb 9vSnt+NfLeexbaUt7/hSr8o=5YF7 -----END PGP SIGNATURE-----
Thanks! 2007/7/16, David Schmitt <david@schmitt.edv-bus.at>:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Monday 16 July 2007, Sébastien Prud''homme wrote: > > I can''t find a way to add a page on the wiki (i''m logged in but there > > is no edit button on the facter recipes page), so here is a recipe for > > DRBD. It has been tested on version 0.8.4. Can someone publish it on > > the web site? > > Uhm, the recipie pages are actually queries for tagged pages. To add a page, > you can just edit the URL (e.g. to > http://reductivelabs.com/trac/puppet/wiki/DrbdFacts) and use the "create > page" button. Don''t forget to add the tags "facter" and "recipe", so it turns > up on the search page. > > Regards, David > > PS: Luke, this seems to be a recurring question. Couldn''t you add a little > note at the bottom of those pages or even a button "add new" or something > like that? > > > if FileTest.exists?("/proc/drbd") > > result = {} > > > > Thread::exclusive do > > File.readlines("/proc/drbd").each do |l| > > if l =~ /(\d+): cs:Unconfigured/ > > device = $1 > > > > result["drbdconnectionstate#{device}"] = "Unconfigured" > > elsif l =~ /(\d+): cs:(\w+) st:(\w+)\/(\w+) ds:(\w+)\/(\w+)/ > > device = $1 > > connectionstate = $2 > > localstate = $3 > > peerstate = $4 > > localdiskstate = $5 > > peerdiskstate = $6 > > > > result["drbdconnectionstate#{device}"] = connectionstate > > result["drbdlocalstate#{device}"] = localstate > > result["drbdpeerstate#{device}"] = peerstate > > result["drbdlocaldiskstate#{device}"] = localdiskstate > > result["drbdpeerdiskstate#{device}"] = peerdiskstate > > end > > end > > end > > > > result.each { |name, fact| > > Facter.add(name) do > > setcode do > > fact > > end > > end > > } > > end > > _______________________________________________ > > Puppet-users mailing list > > Puppet-users@madstop.com > > https://mail.madstop.com/mailman/listinfo/puppet-users > > > > - -- > - - hallo... wie gehts heute? > - - *hust* gut *rotz* *keuch* > - - gott sei dank kommunizieren wir über ein septisches medium ;) > -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFGm1Q7/Pp1N6Uzh0URAhs4AJ9Cxj5ZTEzcE+drdQWtq+7mheL6RwCgmpjb > 9vSnt+NfLeexbaUt7/hSr8o> =5YF7 > -----END PGP SIGNATURE----- > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
On Jul 16, 2007, at 6:19 AM, David Schmitt wrote:> PS: Luke, this seems to be a recurring question. Couldn''t you add a > little > note at the bottom of those pages or even a button "add new" or > something > like that?Not that I can figure out. I agree that it''s silly that there''s no "New Page" link; can someone think of a good way to fix it? Anyone seen how other Trac sites solve this problem? At some point we''re going to have to replace Trac with a "real" CMS... -- Really? He might do it just for fun. I know I would. If I were God, I''d get together with all my other God friends and have a big party. We''d all get drunk and create unliftable rocks, then try to lift them. It would be loads of fun! Then I''d probably just destroy the rocks with a lightning bolt. Then I''d probably pass out. :^) -- toMM, in rec.puzzles --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies wrote:> On Jul 16, 2007, at 6:19 AM, David Schmitt wrote: > >> PS: Luke, this seems to be a recurring question. Couldn''t you add a >> little >> note at the bottom of those pages or even a button "add new" or >> something >> like that? > > Not that I can figure out. I agree that it''s silly that there''s no > "New Page" link; can someone think of a good way to fix it? Anyone > seen how other Trac sites solve this problem? > > At some point we''re going to have to replace Trac with a "real" CMS...Some might suggest replacing a wiki with a CMS isn''t progress. Dave
On Jul 16, 2007, at 9:56 AM, David Campbell wrote:> Some might suggest replacing a wiki with a CMS isn''t progress.I don''t see how they''re exclusive. A CMS can use wiki-style editing. I just would like to be to have a little more structure and form on some of the documents and some of the flow. For instance, if we want the TOC on every page, we currently have to, well, add it to every page -- we can''t change the basic template to always include it. -- One of the Ten Commandments for Technicians (7) Work thou not on energized equipment, for if thou dost, thy fellow workers will surely buy beers for thy widow and console her in other ways. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
> > Not that I can figure out. I agree that it''s silly that there''s no > "New Page" link; can someone think of a good way to fix it? Anyone > seen how other Trac sites solve this problem? >I think about all you could do is have a "New Page" link go to a form, which lets you enter the name of the new page, and then sends you to that URL. Alternatively, you could have a "New Page" link which provides the right bit of documentation to inform users on how to create new pages themselves. Or you could include this documentation in the above page as well. In both cases you can also include site specific notes on page layout and page name policy.
On Jul 16, 2007, at 4:41 PM, Daniel Lawson wrote:> I think about all you could do is have a "New Page" link go to a form, > which lets you enter the name of the new page, and then sends you to > that URL. > > Alternatively, you could have a "New Page" link which provides the > right > bit of documentation to inform users on how to create new pages > themselves. Or you could include this documentation in the above > page as > well. > > In both cases you can also include site specific notes on page layout > and page name policy.Would anyone be willing to work on this? Please let me know if you need direct modifications to the config file, otherwise do you what you need to on the site to make this happen. -- A nation is a society united by delusions about its ancestry and by common hatred of its neighbors. -- William Ralph Inge --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies wrote:> On Jul 16, 2007, at 9:56 AM, David Campbell wrote: > >> Some might suggest replacing a wiki with a CMS isn''t progress. > > I don''t see how they''re exclusive. A CMS can use wiki-style editing. > > I just would like to be to have a little more structure and form on > some of the documents and some of the flow. For instance, if we want > the TOC on every page, we currently have to, well, add it to every > page -- we can''t change the basic template to always include it.Why not, trac just uses quicksilver templates? Dave
On Jul 18, 2007, at 9:26 AM, David Campbell wrote:> Why not, trac just uses quicksilver templates?I guess I could do that. I''ve been hoping to avoid getting into hacking the main templates of trac itself. -- A motion to adjourn is always in order. --Robert Heinlein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com