ansibleuser135
ansibleuser135

Reputation: 93

Is there a way to define the ansible inventory path inside the playbook?

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

Answers (1)

Vladimir Botka
Vladimir Botka

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

Related Questions