Hi It is possible to provide a list of files (not directory) to -i option ??
i have next use case: inventories/amazon/ec2.py inventories/gce/gce.py inventories/inventory ec2 and gce provide different group names, like: tag_Name_stage for amazon tag_stage for google (or even more complex) in inventory file i created [tag_stage] [tag_Name_stage] [app_stage:children] tag_Name_stage tag_stage and when in playbook i use hosts: "app_stage" i want to put -i inventories/amazon/ec2.py , inventories/inventory or i want to put -i inventories/gce/gce.py , inventories/inventory and not both thanks.. On Saturday, July 12, 2014 at 1:36:33 AM UTC+3, Michael DeHaan wrote: > > "How does -i <dir> determine which files are included and which are not? > Can I have edit backups (./aaa~), README.txt, etc... in that directory?" > > It ignores files ending in ".ini" as well as files ending in known backup > extensions or files starting with dot (hidden files) > > Take a look at dir.py in the inventory/ subtree of the source if you are > really curious... but basically most backup extensions will be ignored. > > > > On Fri, Jul 11, 2014 at 5:51 PM, Stuart Reynolds <[email protected] > <javascript:>> wrote: > >> How does -i <dir> determine which files are included and which are not? >> Can I have edit backups (./aaa~), README.txt, etc... in that directory? >> >> Also, are there any plans to allow multiple specific inventory files? (It >> looks like a common request -- are problems anticipated with such a feature? >> >> - Stu >> >> >> >> On Friday, March 1, 2013 3:10:18 PM UTC-8, Michael DeHaan wrote: >>> >>> I've just merged a very nice patch set from @dhozac that enables the >>> inventory file to be a directory >>> >>> If it is a directory, it operates much like a traditional "conf.d" >>> structure, except it allows both inventory files and >>> inventory scripts to be comingled. >>> >>> This means that you can use EC2 and physical-file-based inventory >>> together, and then specify a "-i" inside the >>> directory to specifically target one and not the other. >>> >>> When using this, the patch is structured such that "group_vars" and >>> "host_vars" structures live *inside* the directory, so it's always >>> going to work whether you use the whole directory of inventroy sources >>> or just one file on the inside. >>> >>> I know this was a much requested feature so this is great to see... >>> multiple dynamic inventory sources at once, conf.d files, >>> or both, at the same time in any combination you want! >>> >>> So thanks to Daniel for this one. It will be up on the documentation >>> pages eventually. >>> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/be98a8b0-f362-4f37-be60-daf02c6dddc0%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/be98a8b0-f362-4f37-be60-daf02c6dddc0%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/a6057f4e-7e9c-4a50-bcfc-6eca466d1841%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
