For staging you create a separate group in the same hostfile right?
And you can't name them both "hosts" :), so that shouldn't be a problem.

On Thursday, December 4, 2014 4:38:11 PM UTC+11, Tomasz Kontusz wrote:
>
> 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] <javascript:>> 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.
>>
>>
>>  
> -- 
> 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/4542e6bb-dd7a-4645-89da-1e834b394022%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to