Great thanks. I like that better than using the inventory argument. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Kai Stian Olstad Sent: Sunday, July 10, 2016 11:36 AM To: [email protected] 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 = <name of your 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 [email protected]. To post to this group, send email to [email protected]. 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&data=01%7c01%7cebm%40bing.com%7cc5972a7a82c740997dc008d3a8f10f1b%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=UVnceyeNWd5Xs3mN12o89PZRSrL%2fkKtdkGEztVTiSUA%3d. For more options, visit https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgroups.google.com%2fd%2foptout&data=01%7c01%7cebm%40bing.com%7cc5972a7a82c740997dc008d3a8f10f1b%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=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 [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/CY1PR0301MB12606AB72F694EE5742CCD2ADD3E0%40CY1PR0301MB1260.namprd03.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.
