How to orchestrate master/slave configuration with Ansible group_by, if that's the proper approach?

I’m setting up a Github master/slave configuration via Ansible role.I set up my github inventory file looks like this

`
[github1]
github1.domain.com

[github2]
github2.domain.com

[github3]
github3.domain.com

(more node host groups)

[github1:vars]
master=github1
slaves=[‘github2’, ‘github3’]

(more vars similar to above, denoting master and slaves of other nodes)
`

I run my playbook this way

$ ansible-playbook inventory/github github-install.yml -l **github1**

and my playbook looks like

`

IOW, I want to create a host group from the master and slaves vars of the passed-in limit, github1 in this case.