Use variables to create new hosts and groups in inventory for use in later plays of the same playbook. Takes variables so you can define the new hosts more fully.

Options

namedescriptionrequiredchoices
name The hostname/ip of the host to add to the inventory, can include a colon and a port number. true
groups The groups to add the hostname to, comma separated.

Author

Ansible Core Team ,Seth Vidal