ceuser@deyu:~/ansible_pb$ ansible product -i inventory --list-hosts
hosts (2):
node3
node4
ceuser@deyu:~/ansible_pb$ ansible all -i inventory --list-hosts
hosts (5):
node1
node2
node5
node3
node4
ceuser@deyu:~/ansible_pb$ ansible all --list-hosts [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all' hosts (0):