Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
add --list-hosts-plain for list of hosts suitable for pipes / scripts #40624
Output from --list-hosts contains spurious information (number of hosts, extra white space) which makes it less easily consumed by scripts. The addition of a --list-hosts-plain option omits this extra text.
In the Ansible on RHEL prior to version 2, this extra "Hosts (#):" line was not produced. Upgrading our Ansible broke many of our automation scripts which used "ansible --list-hosts" to get lists of hosts.