Ansible variables for multiple inventories

Hello.
I have following host file:
`
[main:children]
group_1
group_2
[group_1:vars]
testvar=‘testval1’
[group_2:vars]
testvar=‘testval2’

`

Running playbook below I am getting value ‘testval1’

group_2

Could, please, someone explain how can I get right value?

Hello.
I have following host file:
>
[main:children]
group_1
group_2
[group_1:vars]
testvar='testval1'
[group_2:vars]
testvar='testval2'
>

Running playbook below I am getting value 'testval1'
>group_2|

Could, please, someone explain how can I get right value?

Maybe, but please provide the playbook :-).

Regards
        Racke

Ahh. Sorry. Playbook is following:

`