commit
b208885620
2 changed files with 18 additions and 14 deletions
|
@ -48,18 +48,15 @@ end
|
|||
|
||||
Facter.add("postgres_default_version") do
|
||||
setcode do
|
||||
result =
|
||||
case Facter.value('osfamily')
|
||||
when 'RedHat'
|
||||
get_redhatfamily_postgres_version()
|
||||
when 'Debian'
|
||||
get_debianfamily_postgres_version()
|
||||
else
|
||||
nil
|
||||
end
|
||||
if result == nil
|
||||
result = "Unsupported OS! Please check `postgres_default_version` fact."
|
||||
case Facter.value('osfamily')
|
||||
when 'RedHat'
|
||||
get_redhatfamily_postgres_version()
|
||||
when 'Linux'
|
||||
get_redhatfamily_postgres_version()
|
||||
when 'Debian'
|
||||
get_debianfamily_postgres_version()
|
||||
else
|
||||
"Unsupported OS! Please check `postgres_default_version` fact."
|
||||
end
|
||||
result
|
||||
end
|
||||
end
|
||||
end
|
|
@ -84,9 +84,16 @@ class postgresql::params(
|
|||
}
|
||||
}
|
||||
|
||||
# Amazon Linux's OS Family is 'Linux', operating system 'Amazon'.
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
'RedHat', 'Linux': {
|
||||
$needs_initdb = true
|
||||
$initdb_path = '/usr/bin/initdb'
|
||||
$createdb_path = '/usr/bin/createdb'
|
||||
$psql_path = '/usr/bin/psql'
|
||||
$datadir = '/var/lib/pgsql/data/'
|
||||
$pg_hba_conf_path = '/var/lib/pgsql/data/pg_hba.conf'
|
||||
$postgresql_conf_path = '/var/lib/pgsql/data/postgresql.conf'
|
||||
$firewall_supported = true
|
||||
$persist_firewall_command = '/sbin/iptables-save > /etc/sysconfig/iptables'
|
||||
|
||||
|
|
Loading…
Reference in a new issue