This is a fragment of a playbook that I\'m using (server.yml):
server.yml
- name: Determine Remote User hosts: web gather_facts: false roles: - {
Just came across this googling for a solution. Actually, there is one in Ansible 2.5. You can specify your inventory file with --inventory, like this: ansible --inventory configs/hosts --list-hosts all
--inventory
ansible --inventory configs/hosts --list-hosts all