bdangit/chef-influxdb

Default recipe fail to install package on rhel platform family

Closed this issue · 2 comments

It fails due to:

vagrant@localhost ~]$ file /var/chef/cache/influxdb.rpm
/var/chef/cache/influxdb.rpm: Debian binary package (format 2.0)

Caused by:

arch = /x86_64/.match(node[:kernel][:machine]) ? 'amd64' : 'i686'
node.default[:influxdb][:source] = "http://s3.amazonaws.com/influxdb/influxdb_#{ver}_#{arch}.deb"
influxdb 'main' do
  source node[:influxdb][:source]
  config influxdb_config
  action node[:influxdb][:action]
end
def install_influxdb
  extension = node['platform_family'].include?('rhel') ? 'rpm' : 'deb'
  path = ::File.join(Chef::Config[:file_cache_path], "influxdb.#{extension}")
  remote = Chef::Resource::RemoteFile.new(path, @run_context)
  remote.source(@source) if @source
  remote.checksum(@checksum) if @checksum
  remote.run_action(:create)

  install_package path
end

Changing the file extension doesn't turn it magically into an rpm... :)

There a couple of PR's (#37 and #38) that should already fix this but they're not updated or followed up since December last year afaics.

faced this issue.

master supports rhel.