ansible.builtin.advanced_host_list inventory – Parses a ‘host list’ with ranges
Note
This inventory plugin is part of ansible-core
and included in all Ansible
installations. In most cases, you can use the short
plugin name
advanced_host_list
.
However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.advanced_host_list
for easy linking to the
plugin documentation and to avoid conflicting with other collections that may have
the same inventory plugin name.
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
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.