How to harvest YAML files using Filebeat and process them in Logstash

I have a YAML file similar to this:

---
install:
  boot:
    mode: bios
  build: None
  buildmods: pin
  ceph:
    cluster:
      name: ceph
    hci:
      memreserve: false

How can I configure filebeat to collect it and logstash to process it so I eventually have in elasticsearch fields such as:

install.boot.mode: bios
ceph.cluster.name: ceph
hci.memreserve: false