This has to be one of the lowliest questions ever asked here. Apologies for that.
But, I can’t get the ansible.cfg hostfile parameter to work so that I don’t have to specify -i
.
The problem can be reproduced here:
https://github.com/skyl/ansible-sandbox/issues/1
::
ansible local -a "ls /" -i HOSTS
works
But,
$ ansible local -a "ls /"
ERROR: Unable to find an inventory file, specify one with -i ?
$ cat ansible.cfg
[defaults]
hostfile = ./HOSTS
$ cat HOSTS
[local]
127.0.0.1