What are the INI and YAML inventory formats and how do they differ?

BeginnerConceptInventory
Answer

Both describe the same thing. INI is compact; YAML is better for nested groups and typed variables (lists, dicts, booleans).

[web]
web1 ansible_host=10.0.1.11
web2 ansible_host=10.0.1.12

[web:vars]
http_port=8080
all:
  children:
    web:
      hosts:
        web1: { ansible_host: 10.0.1.11 }
        web2: { ansible_host: 10.0.1.12 }
      vars:
        http_port: 8080

In INI, values in key=value are parsed as strings (or literals) with limited typing, which surprises people with [group:vars] lists.

All Ansible questions Roadmap: Ansible

More on Inventory