site.pp 737 B

123456789101112131415161718192021222324252627282930
  1. hiera_include('classes')
  2. class { 'postgresql::server':
  3. ip_mask_allow_all_users => '0.0.0.0/0',
  4. postgres_password => 'TPSrep0rt!',
  5. }
  6. postgresql::server::db { 'kong':
  7. user => 'kong',
  8. password => postgresql_password('kong', 'kong'),
  9. }
  10. postgresql::server::pg_hba_rule { 'allow access to kong database':
  11. description => 'Open up PostgreSQL for access from localhost',
  12. type => 'host',
  13. database => 'kong',
  14. user => 'kong',
  15. address => '127.0.0.1/32',
  16. auth_method => 'trust',
  17. }
  18. postgresql::server::role { 'kong':
  19. password_hash => postgresql_password('kong', 'kong'),
  20. }
  21. postgresql::server::database_grant { 'kong':
  22. privilege => 'ALL',
  23. db => 'kong',
  24. role => 'kong',
  25. }