Advertisement
okelet

Clean yum.repos.d directory with Puppet conditionally

Sep 5th, 2011
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. class repos($keep = 0)
  2. {
  3.  
  4. $base_repo = "http://yum.XXXXXX.local/repo"
  5.  
  6. # Asegurarse de que el repositorio existe, y de que está vacío si no queremos conservar los posibles repositorios existentes.
  7. file
  8. {
  9. "/etc/yum.repos.d":
  10. ensure => directory,
  11. owner => root,
  12. group => root,
  13. mode => 755,
  14. if ($keep == 0)
  15. {
  16. recurse => true,
  17. purge => true,
  18. force => true,
  19. }
  20. }
  21.  
  22.  
  23.  
  24. Sep 5 09:47:54 puppet-server puppet-master[13804]: Could not parse for environment production: Syntax error at 'if'; expected '}' at /etc/puppet/manifests/repos.pp:14 on node puppet-client02.XXXXXX.local
  25. Sep 5 09:47:54 puppet-server puppet-master[13804]: Could not parse for environment production: Syntax error at 'if'; expected '}' at /etc/puppet/manifests/repos.pp:14 on node puppet-client02.XXXXXX.local
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement