# Determine which server in inventory is the executor

**URL:** <https://forum.ansible.com/t/determine-which-server-in-inventory-is-the-executor/30231>\
**Category:** Ansible Project\
**Created:** [May 1, 2019, 5:43pm UTC](https://forum.ansible.com/t/determine-which-server-in-inventory-is-the-executor/30231 "2019-05-01T17:43:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Brewer](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Eric\_Brewer](https://forum.ansible.com/u/Eric_Brewer)\
**Post date:** [May 1, 2019, 5:43pm UTC](https://forum.ansible.com/t/determine-which-server-in-inventory-is-the-executor/30231/1 "2019-05-01T17:43:06Z")

</div>

I have a situation where i need to be able to load new packages on a server, and turn it into an nfs yum repo. I have a playbook that does this, and mounts the directory the repo will live on to the other servers and sets up all the required repo files. The only thing I am struggling with, is how to programmaticly determine which one of the servers in my inventory is the executor on any given run, so I can set the ip of the executor as the mount ip on all of the other servers. And the goal of this is full automation, so I can’t go in and set a variable manually, and I was wondering if anyone had any ideas?

Thanks in advance!
