Let's suppose that the groups [centos] and [ubuntu] are already defined in the inventory. Then:
[linux:children] centos ubuntu