fruit-bowl/environments/production/modules/postgresql/manifests/init.pp
2025-04-01 17:49:26 +00:00

34 lines
729 B
Puppet

class postgresql {
contain postgresql::install
contain postgresql::pgadmin
}
class postgresql::install {
# https://www.postgresql.org/download/linux/debian/
package { 'postgresql-common':
ensure => installed
} ~>
exec { 'postgresql-install':
command => '/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y',
refreshonly => true,
} ~>
exec { 'postgresql-apt-update':
command => 'apt update',
path => ['/usr/bin'],
refreshonly => true,
} ~>
package { 'postgresql-16':
ensure => installed
} ~>
package { 'postgresql-client-16':
ensure => installed
}
}
class postgresql::service {
service { 'postgresql':
ensure => running,
enable => true
}
}