--list-hosts
lists hosts that match a --limit
. The input is the -i
, inventory. Your inventory is a file named hosts
, which doesn’t exist.
You need to create or generate an inventory file from somewhere. Ansible can’t intuit what your inventory is.
More Related Contents:
- How to use Ansible’s with_item with a variable?
- How can I use Ansible nested variable?
- Using set_facts and with_items together in Ansible
- Using Ansible set_fact to create a dictionary from register results
- Only check whether a line present in a file (ansible)
- How to loop over this dictionary in Ansible?
- How to get the first element of a list from the output of setup module in Ansible?
- In Ansible, how to combine variables from separate files into one array?
- Whats the difference between ansible ‘raw’, ‘shell’ and ‘command’?
- Specify sudo password for Ansible
- How do I register a variable and persist it between plays targeted on different nodes?
- Why does Ansible show “ERROR! no action detected in task” error?
- How to switch a user per task or set of tasks?
- How can a user with SSH keys authentication have sudo powers in Ansible? [duplicate]
- How can I make Ansible interpret a variable inside a variable?
- Ansible stdout Formatting
- Ansible: how to construct a variable from another variable and then fetch it’s value
- ansible run command on remote host in background
- How to set environmental variables using Ansible
- ERROR! ‘fail’ is not a valid attribute for a Play
- Ansible shows error: “One or more undefined variables: ‘item’ is undefined” when using ‘with_items’
- How to set host_key_checking=false in ansible inventory file?
- Ansible with_subelements
- Ansible remote_user vs ansible_user
- Ansible “when variable == true” not behaving as expected
- Ansible with a bastion host / jump box? [duplicate]
- How can I use a condition to set a variable value in Ansible?
- How can I copy files between two managed nodes using Ansible?
- Rundeck integration with Ansible through plugin
- Accessing inventory host variable in Ansible playbook