#
# Cookbook:: irrigate-haproxy
# Recipe:: package
#
# Author:: Russell de Moose (<rdemoose@theorchard.com>)
# Copyright:: (C) The Orchard
#

package 'psmisc' if platform_family?('rhel')

# Make sure the firewall is installed and enabled
firewall 'default' do
  action :install
end

if node['platform_version'].start_with?('7')

  yum_repository 'orchard_haproxy' do
    description 'Orchard HAproxy Repository'
    baseurl 'https://packagecloud.io/orchardit/haproxy/el/7/$basearch/'
    gpgcheck false
    gpgkey 'https://packagecloud.io/orchardit/haproxy/gpgkey'
    repo_gpgcheck true
    action :create
  end

  package 'haproxy'

end
