robs
robs

Reputation: 57

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?

Upvotes: 3

Views: 471

Answers (1)

leucos
leucos

Reputation: 18269

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.

Upvotes: 4

Related Questions