Skip to main content
DevOps Tools

Ansible Inventory Generator

Generate an Ansible inventory file in INI or YAML format with groups, hosts, and variables.

Define your host groups, hosts, and any variables - this tool generates a valid Ansible inventory file in INI or YAML format.

Pair this with the Ansible Playbook Generator - the `hosts` value in a playbook should match a group name defined in your inventory.

What Is an Ansible Inventory?

An Ansible inventory file lists the hosts Ansible manages, optionally organized into groups, along with per-host or per-group variables like SSH connection details - it's how Ansible knows which machines to run tasks against.

Why Use This Tool?

Both INI and YAML inventory formats have their own specific syntax for groups, host ranges, and variables. This tool generates a correctly-formatted file in either style from a simple list of groups and hosts.

How to Use It

  1. Choose INI or YAML output format.
  2. Add one or more groups, each with its hosts.
  3. Optionally add group variables (like ansible_user or ansible_ssh_private_key_file).
  4. Copy the generated inventory file.

Limitations

This covers standard static inventory syntax - dynamic inventory scripts/plugins (which query a cloud provider directly) are a different mechanism this tool does not generate.

Share this tool: