Merge pull request #39 from haf/amz-linux

Amz linux
This commit is contained in:
Chris Price 2013-01-14 13:46:01 -08:00
commit b208885620
2 changed files with 18 additions and 14 deletions

View file

@ -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 'Linux'
get_redhatfamily_postgres_version()
when 'Debian'
get_debianfamily_postgres_version()
else
nil
"Unsupported OS! Please check `postgres_default_version` fact."
end
if result == nil
result = "Unsupported OS! Please check `postgres_default_version` fact."
end
result
end
end

View file

@ -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'