Guest User

Untitled

a guest
Oct 16th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. So normally you might write some ruby that did this:
  2.  
  3. generate_etc_update_pp.rb
  4.  
  5. for name, md5, status in cf.config.conf
  6. GentooConfigFile { $name:
  7. md5 => md5,
  8. status => $status,
  9. }
  10.  
  11. Right? So basically exactly like cf.config.pl. We would write some ruby that in turn writes a few hundred puppet resources and then we implement GentooConfigFile to do the needful (accept, reject, merge, etc..)
  12.  
  13. I'm saying that that is silly and we should avoid it. We can avoid it because unlike cfengine *it is really easy to write full ruby extension in puppet*.
  14.  
  15. So my proposal is instead of the above, we simply have:
  16.  
  17. GentooConfigFile { /path/to/cf.config.pl }
  18.  
  19. That it. No hundreds of resources, or anything like that. The actual type we (you?) are writing can auto-acquire the file resource for /path/to/cf.config.pl, open the file, parse it, and then take action on the contents.
  20.  
  21. -A
Add Comment
Please, Sign In to add comment