# HAProxy Module Question

**URL:** <https://forum.ansible.com/t/haproxy-module-question/17911>\
**Category:** Ansible Project\
**Created:** [April 6, 2015, 2:45pm UTC](https://forum.ansible.com/t/haproxy-module-question/17911 "2015-04-06T14:45:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Buckholz](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@Zachary\_Buckholz](https://forum.ansible.com/u/Zachary_Buckholz)\
**Post date:** [April 6, 2015, 2:45pm UTC](https://forum.ansible.com/t/haproxy-module-question/17911/1 "2015-04-06T14:45:08Z")

</div>

I am trying to update the haproxy.cfg with a new server entry and then add the required pool info for that new server.

Currently I am attempting to use the lineinfile module to do this, it works but I want to make sure I ‘completely’ understand why I didn’t use the HAProxy module directly.

My understand of the HAProxy module are that a server entry already needs to exist in the haproxy.cfg before you can modify pool entries. Is this correct? Or can the HAProxy module create new servers in the haproxy.cfg?

Thanks  
Zach

---

<div class="post-metadata">

**Author:** ![Ravi\_Bhure](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Ravi\_Bhure](https://forum.ansible.com/u/Ravi_Bhure)\
**Post date:** [April 6, 2015, 5:54pm UTC](https://forum.ansible.com/t/haproxy-module-question/17911/2 "2015-04-06T17:54:32Z")

</div>

Zach,  
HAProxy module using the admin socket feature internally to manage add/remove backend servers from LB pool, so it is required to have backend servers already configured and available in to haproxy.cfg

Ravi
