rbd.pp 476 B

1234567891011121314151617181920212223
  1. # == Defined type: ceph::rbd
  2. #
  3. #
  4. define ceph::rbd (
  5. $id,
  6. $keyring
  7. ) {
  8. ensure_resource('service', 'rbdmap', { 'ensure' => 'running', 'enable' => 'true' })
  9. file_line { "${title}_rbdmap":
  10. line => "${title} id=${id},keyring=${keyring}",
  11. path => '/etc/ceph/rbdmap',
  12. notify => Service['rbdmap'],
  13. }
  14. exec { "ensure ${title} is mapped":
  15. command => '/bin/true',
  16. unless => "/bin/test -b /dev/rbd/${title}",
  17. notify => Service['rbdmap'],
  18. }
  19. }