# Build a custom apache module vs. using it through a role

**URL:** <https://forum.ansible.com/t/build-a-custom-apache-module-vs-using-it-through-a-role/21958>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [July 8, 2016, 9:28am UTC](https://forum.ansible.com/t/build-a-custom-apache-module-vs-using-it-through-a-role/21958 "2016-07-08T09:28:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 8, 2016, 9:28am UTC](https://forum.ansible.com/t/build-a-custom-apache-module-vs-using-it-through-a-role/21958/1 "2016-07-08T09:28:25Z")

</div>

Hi

I'm using the geerlingguy.apache role to deploy apache, in my case  
onto Ubuntu 16.04.  
This works great.  
The machine needs to run a custom build apache module, but I'm not  
sure what the best way is to order things.

The apache role takes care of enabling modules, and also the vhost  
config - which includes module specific statements.  
If I want to use that then obviously the module first has to exist.

So I first run a playbook to compile my module. The resulting module  
definition should go into /etc/apache2/mod-available/mymodule.load -  
which doesn't exist.

It's a bit of a chicken/egg situation.

I could just create /etc/apache2/mods-available/mymodule.load in the  
first playbook, so that the apache role can find it, but that seems  
dodgy.  
Or is this not a problem?

Thanks!

Dick Visser
