Documentation

host_list - Parses a ‘host list’ string

New in version 2.4.

Synopsis

  • Parses a host list string as a comma separated values of hosts
  • This plugin only applies to inventory strings that are not paths and contain a comma.

Examples

# define 2 hosts in command line
# ansible -i '10.10.2.6, 10.10.2.4' -m ping all

# DNS resolvable names
# ansible -i 'host1.example.com, host2' -m user -a 'name=me state=absent' all

# just use localhost
# ansible-playbook -i 'localhost,' play.yml -c local

Status

This inventory is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This inventory is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • UNKNOWN

Hint

If you notice any issues in this documentation you can edit this document to improve it.