'Reads the file contents from the given file name
If the contents are vault-encrypted, it will decrypt them and return
the decrypted data
:arg file_name: The name of the file to read.  If this is a relative
path, it will be expanded relative to the basedir
:raises AnsibleFileNotFOund: if the file_name does not refer to a file
:raises AnsibleParserError: if we were unable to read the file
:return: Returns a byte string of the file contents'

def _get_file_contents(self, file_name):

    if ((not file_name) or (not isinstance(file_name, (binary_type, text_type)))):
        raise AnsibleParserError(("Invalid    filename:    '%s'" % str(file_name)))
    b_file_name = to_bytes(self.path_dwim(file_name))
    if ((not self.path_exists(b_file_name)) or (not self.is_file(b_file_name))):
        raise AnsibleFileNotFound('Unable    to    retrieve    file    contents', file_name=file_name)
    show_content = True
    try:
        with open(b_file_name, 'rb') as f:
            data = f.read()
            if is_encrypted(data):
                (b_ciphertext, b_version, cipher_name, vault_id) = parse_vaulttext_envelope(data)
                data = self._vault.decrypt(data, filename=b_file_name)
                show_content = False
        return (data, show_content)
    except (IOError, OSError) as e:
        raise AnsibleParserError(("an    error    occurred    while    trying    to    read    the    file    '%s':    %s" % (file_name, str(e))), orig_exc=e)
