Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. node 'mysql.tor1.example.com' {
  2. include basenode
  3. include mysql_backup
  4. include postgres_backup
  5.  
  6. $puppetdb_db_name = hiera('puppetdb_db_name')
  7. $puppetdb_db_user = hiera('puppetdb_db_user')
  8. $puppetdb_db_passwd = hiera('puppetdb_db_passwd')
  9.  
  10. class { 'postgresql::globals':
  11. encoding => 'UTF-8',
  12. version => '95',
  13. } ->
  14.  
  15. class { 'postgresql::server':
  16. pg_hba_conf_defaults => false,
  17. listen_addresses => ['localhost', $ipaddress_vtnet1],
  18. }
  19.  
  20. postgresql::server::role{$puppetdb_db_user:
  21. password_hash => postgresql_password($puppetdb_db_user, $puppetdb_db_passwd),
  22. } ->
  23.  
  24. postgresql::server::db{$puppetdb_db_name:
  25. user => $puppetdb_db_user,
  26. password => postgresql_password($puppetdb_db_user, $puppetdb_db_passwd),
  27. owner => $puppetdb_db_user,
  28. encoding => 'UTF-8',
  29. }
  30.  
  31. postgresql::server::pg_hba_rule{'allow application network access':
  32. description => '"local" is for Unix domain socket connections only',
  33. type => 'local',
  34. database => 'all',
  35. user => 'all',
  36. auth_method => 'trust',
  37. }
  38. postgresql::server::pg_hba_rule{'IPv4 local connections':
  39. description => 'IPv4 local connections',
  40. type => 'host',
  41. database => 'all',
  42. user => 'all',
  43. address => '127.0.0.1/32',
  44. auth_method => 'trust',
  45. }
  46.  
  47. postgresql::server::pg_hba_rule{'wattersm connections':
  48. description => 'wattersm connections',
  49. type => 'host',
  50. database => 'all',
  51. user => 'wattersm',
  52. address => '10.137.255.115/32',
  53. auth_method => 'md5',
  54. }
  55.  
  56. postgresql::server::pg_hba_rule{'puppetdb connections':
  57. description => 'puppetdb connections',
  58. type => 'host',
  59. database => $puppetdb_db_name,
  60. user => $puppetdb_db_user,
  61. address => '10.137.64.139/32',
  62. auth_method => 'md5',
  63. }
  64.  
  65. postgresql::server::pg_hba_rule{'IPv6 local connections':
  66. description => 'IPv6 local connections',
  67. type => 'host',
  68. database => 'all',
  69. user => 'all',
  70. address => '::1/128',
  71. auth_method => 'md5',
  72. }
  73.  
  74. package { 'postgresql95-contrib':
  75. ensure => installed,
  76. }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement