using variables defined in files when running ansible command?

here is the content of inventory file, admin_pass is defined in secrets.yml file,

[group1]
host1
[group1:vars]
ansible_become_pass={{admin_pass}}

the question is, how to reference variables defined in a file when running ansible command? we tried the following but didn’t work, can someone help?

Copy paste from "man ansible"

-e EXTRA_VARS, --extra-vars='EXTRA_VARS
Extra variables to inject into a playbook, in key=value key=value format or as quoted YAML/JSON (hashes and arrays). To load variables from a file, specify the file preceded by @ (e.g. @vars.yml).

Copy paste from “man ansible”

i only tried “ansible --help” :frowning:

-e EXTRA_VARS, --extra-vars='EXTRA_VARS
Extra variables to inject into a playbook, in key=value key=value format
or as quoted YAML/JSON (hashes and arrays). To load variables from a
file, specify the file preceded by @ (e.g. @vars.yml).

it works now, thank for your help.