class elastic::filebeat {
  contain elastic::filebeat::install
}

class elastic::filebeat::install {
  file { '/opt/filebeat':
    ensure => directory
  }

  file { '/opt/filebeat/filebeat.deb':
    ensure => file,
    source => 'https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.10.2-amd64.deb'
  } ~>
  package { 'filebeat':
    provider => dpkg,
    source => "/opt/filebeat/filebeat.deb"
  }
}
