how to pass a file into AnsibleModule as argument

I know the basic to pass a some string to an Ansible Module as argument, but curious how to pass a file

for example:
I have a file containing some variable in yaml format (eg: /var/www/project/var.yaml)

def main():
module = AnsibleModule(
argument_spec = dict(user = dict(default=‘me’),
pass = dict(required=True),
ip = dict(required=True),
var1 = dict(required=True),
filename = dict(required=True),
))

the argument ‘filename’ is expected to be a file, I want to pass the var.yaml into the ansible module which will read it
Thank you so much