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 Facter.add("postgres_default_version") do
setcode do setcode do
result = case Facter.value('osfamily')
case Facter.value('osfamily') when 'RedHat'
when 'RedHat' get_redhatfamily_postgres_version()
get_redhatfamily_postgres_version() when 'Linux'
when 'Debian' get_redhatfamily_postgres_version()
get_debianfamily_postgres_version() when 'Debian'
else get_debianfamily_postgres_version()
nil else
end "Unsupported OS! Please check `postgres_default_version` fact."
if result == nil
result = "Unsupported OS! Please check `postgres_default_version` fact."
end end
result
end end
end end

View file

@ -84,9 +84,16 @@ class postgresql::params(
} }
} }
# Amazon Linux's OS Family is 'Linux', operating system 'Amazon'.
case $::osfamily { case $::osfamily {
'RedHat': { 'RedHat', 'Linux': {
$needs_initdb = true $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 $firewall_supported = true
$persist_firewall_command = '/sbin/iptables-save > /etc/sysconfig/iptables' $persist_firewall_command = '/sbin/iptables-save > /etc/sysconfig/iptables'