How to manage different password for different group with same hostname

How to manage different password for different group with same hostname ?

Ex.,

[group1]
test-01 ansible_sudo_pass=‘pass1’ ansible_ssh_pass=‘pass1’
test-02
test-03
test-04

[group2]
test-01 ansible_sudo_pass=‘pass3’ ansible_ssh_pass=‘pass4’