# How to orchestrate master/slave configuration with Ansible group\_by, if that's the proper approach?

**URL:** <https://forum.ansible.com/t/how-to-orchestrate-master-slave-configuration-with-ansible-group-by-if-thats-the-proper-approach/27316>\
**Category:** Ansible Project\
**Created:** [April 18, 2018, 3:39pm UTC](https://forum.ansible.com/t/how-to-orchestrate-master-slave-configuration-with-ansible-group-by-if-thats-the-proper-approach/27316 "2018-04-18T15:39:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [April 18, 2018, 3:39pm UTC](https://forum.ansible.com/t/how-to-orchestrate-master-slave-configuration-with-ansible-group-by-if-thats-the-proper-approach/27316/1 "2018-04-18T15:39:02Z")

</div>

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](http://github1.domain.com)

[github2]  
[github2.domain.com](http://github2.domain.com)

[github3]  
[github3.domain.com](http://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

`

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [April 19, 2018, 2:03pm UTC](https://forum.ansible.com/t/how-to-orchestrate-master-slave-configuration-with-ansible-group-by-if-thats-the-proper-approach/27316/2 "2018-04-19T14:03:04Z")

</div>

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