format of the /etc/ansible/hosts file

This is probably an FAQ, and I apologize, but I can’t find this explicitly written anywhere.

In my /etc/ansible/hosts file, I have a few hosts that are not in any group, followed by a bunch of groups with hosts

hostA
hostB

hostC

hostD

[group1]
host1
host2
host3

I want to verify that these three statements are correct:

All “ungrouped” hosts must appear in the file before the first group label.

Once I have defined a group label, all following hosts are in that group, until EOF or the next group label.

Blank lines in between hosts do not end a group section.

Thanks.

–EbH

the suppository is placed on the flat part

All three of them are correct.

Thanks.

–EbH

'hosts file format' is not a single thing, we have several ones to
choose from, by default 'ini-ish', yaml and toml, it is plugin based
so you can basically use any format you want as long as there is a
plugin for it.