What are common inventory file formats?

QuestionsQuestions8 SkillsProAnsible Groups InventoryOct, 31 2025
068

Common inventory file formats for Ansible include:

  1. INI Format:

    • A simple text format where hosts are grouped under headers.
    [webservers]
    server1.example.com
    server2.example.com
    
    [databases]
    db1.example.com
    db2.example.com
  2. YAML Format:

    • A more structured and human-readable format that supports complex inventories.
    all:
      hosts:
        server1.example.com:
        server2.example.com:
      children:
        webservers:
          hosts:
            server1.example.com:
            server2.example.com:

0 Comments

no data
Be the first to share your comment!