mysql_placement.pp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # == Class: nova::db::mysql_placement
  2. #
  3. # Class that configures mysql for the nova_placement database.
  4. #
  5. # === Parameters:
  6. #
  7. # [*password*]
  8. # Password to use for the nova user
  9. #
  10. # [*dbname*]
  11. # (optional) The name of the database
  12. # Defaults to 'nova_placement'
  13. #
  14. # [*user*]
  15. # (optional) The mysql user to create
  16. # Defaults to 'nova_placement'
  17. #
  18. # [*host*]
  19. # (optional) The IP address of the mysql server
  20. # Defaults to '127.0.0.1'
  21. #
  22. # [*charset*]
  23. # (optional) The charset to use for the nova database
  24. # Defaults to 'utf8'
  25. #
  26. # [*collate*]
  27. # (optional) The collate to use for the nova database
  28. # Defaults to 'utf8_general_ci'
  29. #
  30. # [*allowed_hosts*]
  31. # (optional) Additional hosts that are allowed to access this DB
  32. # Defaults to undef
  33. #
  34. class nova::db::mysql_placement(
  35. $password,
  36. $dbname = 'nova_placement',
  37. $user = 'nova_placement',
  38. $host = '127.0.0.1',
  39. $charset = 'utf8',
  40. $collate = 'utf8_general_ci',
  41. $allowed_hosts = undef,
  42. ) {
  43. include ::nova::deps
  44. ::openstacklib::db::mysql { 'nova_placement':
  45. user => $user,
  46. password_hash => mysql_password($password),
  47. dbname => $dbname,
  48. host => $host,
  49. charset => $charset,
  50. collate => $collate,
  51. allowed_hosts => $allowed_hosts,
  52. }
  53. Anchor['nova::db::begin']
  54. ~> Class['nova::db::mysql_placement']
  55. ~> Anchor['nova::db::end']
  56. }