I think explicitly passing in the inventory is OK: pretty soon you'll have at least two of them (staging/prod etc.), and you REALLY don't want to apply changes to the wrong set of hosts ;-)
If you still want to set a default inventory path, you can do this through ANSIBLE_HOSTS environment variable or by setting "hostfile" in ansible.cfg Yvo van Beek <[email protected]> napisał: >Hi, > >It seems common practice for playbooks to have a "hosts" file in the >root >of the playbook. >When you run a playbook you have to supply it via the -i parameter, >otherwise you will get the error: "ERROR: Unable to find an inventory >file, >specify one with -i ?" > >It would be nice if Ansible would automaticly detect the hosts file in >the >playbook folder. Less arguments would make it even easier to use. > > >-- >You received this message because you are subscribed to the Google >Groups "Ansible Project" group. >To unsubscribe from this group and stop receiving emails from it, send >an email to [email protected]. >To post to this group, send email to [email protected]. >To view this discussion on the web visit >https://groups.google.com/d/msgid/ansible-project/5bb13a14-3cd4-4fbc-87d4-37b64d2246cd%40googlegroups.com. >For more options, visit https://groups.google.com/d/optout. -- Wysłane za pomocą K-9 Mail. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d85334af-3b59-46e0-822f-2e8a771c3abc%40email.android.com. For more options, visit https://groups.google.com/d/optout.
