code: def _parse_hostvar_file(self, hostname, path):
          
          # Check for ansible-vault files, because they're valid yaml for
          # some reason... (psst, the reason is that yaml sucks)
          first_line = open(path, 'r').readline()
          if first_line.startswith('$ANSIBLE_VAULT'):
              self.log.warning("Skipping encrypted vault file {0}".format(path))
              return
  
          try:
              self.log.debug("Reading host vars from {}".format(path))
              f = codecs.open(path, 'r', encoding='utf8')
              invars = ihateyaml.safe_load(f)
              f.close()
          except Exception as err:
              # Just catch everything because yaml...
              self.log.warning("Yaml couldn't load '{0}'. Skipping. Error was: {1}".format(path, err))
              return
  
          if invars is None:
              # Empty file or whatever. This is *probably* a side-effect of our
              # own yaml.SafeLoader implementation ('ihateyaml'), because this
              # problem didn't exist before.
              return
  
          if hostname == "all":
              # Hostname 'all' is special and applies to all hosts
              for hostname in self.hosts_all():
                  self.update_host(hostname, {'hostvars': invars}, overwrite=False)
          else:
              self.update_host(hostname, {'hostvars': invars}, overwrite=True)
docs: Parse a host var file and apply it to host `hostname`.