diff --git a/lib/facter/postgres_default_version.rb b/lib/facter/postgres_default_version.rb index 76ee66c..12c93b7 100644 --- a/lib/facter/postgres_default_version.rb +++ b/lib/facter/postgres_default_version.rb @@ -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 \ No newline at end of file diff --git a/manifests/params.pp b/manifests/params.pp index 0328e96..126be21 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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'