ansible.add_host(3) - Linux man page

Name

add_host - add a host (and alternatively a group) to the ansible-playbook in-memory inventory

Description

Use variables to create new hosts and groups in inventory for use in later plays of the same playbook

Options

groupname

The groupname to add the hostname to.
hostname
The hostname/ip of the host to add to the inventory(required)."

Examples

add host to group 'just_created'

add_host hostname=${ip_from_ec2create} groupname=just_created

Author

Seth Vidal

See Also

ansible(1), http://ansible.github.com/modules.html#add-host