is nested yaml inventory file for ansible supported?
问题 I'm trying to use a yaml file as inventory file which looks like below: - prod: webserver: hosts: example1.com db_servers: hosts: example2.com example3.com - stag: webserver: hosts: example3.com It doesn't seem to work, and I couldn't find much info on ansible docs arounf yaml inventory file. Is the above supported? 回答1: No, this is not supported. You are supposed to have different inventories for production/testing. You can only define single dependency tree like this: webserver: hosts: