Reputation: 93
I'm trying to find a way to specify the inventory path in a playbook instead of in the ansible.cfg file or by using -i during execution of the playbook. Is this possible?
Upvotes: 1
Views: 364
Reputation: 67984
No. It's not possible to define the ansible inventory path inside the playbook.
Quoting from Ansible Configuration Settings
"Ansible supports a few ways of providing configuration variables, mainly through environment variables, command line switches and an ini file named ansible.cfg
Upvotes: 2