postgresql_db.pp 814 B

123456789101112131415161718192021222324252627282930
  1. class { 'postgresql::server':
  2. config_hash => {
  3. 'ip_mask_allow_all_users' => '0.0.0.0/0',
  4. 'listen_addresses' => '*',
  5. 'manage_redhat_firewall' => true,
  6. #'ip_mask_deny_postgres_user' => '0.0.0.0/32',
  7. #'postgres_password' => 'puppet',
  8. },
  9. }
  10. postgresql::db{ 'test1':
  11. user => 'test1',
  12. password => 'test1',
  13. grant => 'all',
  14. }
  15. postgresql::db{ 'test2':
  16. user => 'test2',
  17. password => postgresql_password('test2', 'test2'),
  18. grant => 'all',
  19. }
  20. postgresql::db{ 'test3':
  21. user => 'test3',
  22. # The password here is a copy/paste of the output of the 'postgresql_password'
  23. # function from this module, with a u/p of 'test3', 'test3'.
  24. password => 'md5e12234d4575a12bfd61d61294f32b086',
  25. grant => 'all',
  26. }