]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blame - modules/role/manifests/cryptoportfolio/postgresql.pp
Merge branch 'dev'
[perso/Immae/Projets/Puppet.git] / modules / role / manifests / cryptoportfolio / postgresql.pp
CommitLineData
39e05b4e
IB
1class role::cryptoportfolio::postgresql inherits role::cryptoportfolio {
2 $password_seed = lookup("base_installation::puppet_pass_seed")
3
4 $pg_password = generate_password(24, $password_seed, "postgres_cryptoportfolio")
39e05b4e 5
3925777d
IB
6 profile::postgresql::master { "postgresql master for cryptoportfolio":
7 letsencrypt_host => $web_host,
8 backup_hosts => ["backup-1"],
39e05b4e
IB
9 }
10
11 postgresql::server::db { $pg_db:
12 user => $pg_user,
13 password => postgresql_password($pg_user, $pg_password),
14 }
39e05b4e 15
7f8d0f89 16 postgresql::server::pg_hba_rule { 'allow local access to cryptoportfolio user':
3925777d 17 type => 'local',
39e05b4e
IB
18 database => $pg_db,
19 user => $pg_user,
3925777d 20 auth_method => 'ident',
39e05b4e
IB
21 order => "05-01",
22 }
6d1c9c43 23
39e05b4e 24}