简体   繁体   中英

What is the proper syntax for an ansible inventory file?

This is my inventory.yml file:

[hosts]
somedns1.aws.com
somedns2.aws.com
somedns3.aws.com
somedns4.aws.com
somedns5.aws.com

But I'm getting --list ([Errno 8] Exec format error)

It looks fine as per this link , any idea?

Your inventory file is probably executable. Also, inventory files are not in YAML format (hence extension for your inventory is misleading).

Try :

mv inventory.yml inventory
chmod a-x inventory

and it should be better.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM