The right answer to this probably depends on where this "input file" is located (on Ansible server or on hosts being modified) and what you're wanting to do with the information. But in general, if you are talking about reading a YAML or JSON file into variables for use within a playbook you can take a look at include_vars. Hosts can also provide local JSON or INI information via *.fact files in /etc/ansible/facts.d. Or you can read YAML information specific to hosts, groups, etc via all the variable directory conventions (group_vars, host_vars, etc)If you can give some further details, someone may have a better plan.