Skip to content

advanced_host_list

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 2.4.

Synopsis

  • Parses a host list string as a comma separated values of hosts and supports host ranges.
  • This plugin only applies to inventory sources that are not paths and contain at least one comma.

Examples

    # simple range
    # ansible -i 'host[1:10],' -m ping

    # still supports w/o ranges also
    # ansible-playbook -i 'localhost,' play.yml