RE: [ansible-project] Ansible-play reference a local hosts file

2016-07-10 Thread Eric Marquez
Great thanks.  I like that better than using the inventory argument. 

-Original Message-
From: ansible-project@googlegroups.com 
[mailto:ansible-project@googlegroups.com] On Behalf Of Kai Stian Olstad
Sent: Sunday, July 10, 2016 11:36 AM
To: ansible-project@googlegroups.com
Subject: Re: [ansible-project] Ansible-play reference a local hosts file

On 10. juli 2016 20:22, Eric Marquez wrote:
> How do I get Ansible-play to reference a local hosts files?  I created a 
> hosts file in the same directly with my site.yaml file but it doesn't seem to 
> reference it.  Is there a way to get it to use a local vs the 
> /etc/Ansible/hosts?
> I would like to have a local version and not need to update the master with a 
> priv account.

In the same directory as your site.yaml and host file, create a ansible.cfg 
file with the following content:

[defaults]
hostfile  = 


--
Kai Stian Olstad

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgroups.google.com%2fd%2fmsgid%2fansible-project%2f57829590.1040506%2540olstad.com=01%7c01%7cebm%40bing.com%7cc5972a7a82c740997dc008d3a8f10f1b%7c72f988bf86f141af91ab2d7cd011db47%7c1=UVnceyeNWd5Xs3mN12o89PZRSrL%2fkKtdkGEztVTiSUA%3d.
For more options, visit 
https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgroups.google.com%2fd%2foptout=01%7c01%7cebm%40bing.com%7cc5972a7a82c740997dc008d3a8f10f1b%7c72f988bf86f141af91ab2d7cd011db47%7c1=j%2b7xXnL2zn%2bZJiG7j%2fQISAT77ViCxJ%2fzcOhIrIVjw7A%3d.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CY1PR0301MB12606AB72F694EE5742CCD2ADD3E0%40CY1PR0301MB1260.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Ansible-play reference a local hosts file

2016-07-10 Thread Kai Stian Olstad

On 10. juli 2016 20:22, Eric Marquez wrote:

How do I get Ansible-play to reference a local hosts files?  I created a hosts 
file in the same directly with my site.yaml file but it doesn't seem to 
reference it.  Is there a way to get it to use a local vs the 
/etc/Ansible/hosts?
I would like to have a local version and not need to update the master with a 
priv account.


In the same directory as your site.yaml and host file, create a 
ansible.cfg file with the following content:


[defaults]
hostfile  = 


--
Kai Stian Olstad

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/57829590.1040506%40olstad.com.
For more options, visit https://groups.google.com/d/optout.