# Rolling updates with loadbalancers and backends on different ports...

**URL:** <https://forum.ansible.com/t/rolling-updates-with-loadbalancers-and-backends-on-different-ports/14602>\
**Category:** Ansible Project\
**Created:** [February 19, 2014, 3:11pm UTC](https://forum.ansible.com/t/rolling-updates-with-loadbalancers-and-backends-on-different-ports/14602 "2014-02-19T15:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juri\_Rischel\_Jensen](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Juri\_Rischel\_Jensen](https://forum.ansible.com/u/Juri_Rischel_Jensen)\
**Post date:** [February 19, 2014, 3:11pm UTC](https://forum.ansible.com/t/rolling-updates-with-loadbalancers-and-backends-on-different-ports/14602/1 "2014-02-19T15:11:46Z")

</div>

Hi all,

I have a problem with the rolling update functionality. I have some loadbalancers and some backend servers, and need to disable the backend servers, one by one, in the loadbalancers during the upgrade. My initial connection to the lb’s to gather facts is working fine, but when I connect to the backend servers, do the preparation, and get to where I want to disable the backend server, the delegate\_to is failing. I’m using the example of a rolling update from the ansible-examples git repo - with the exception that the loadbalancers and backends has SSH running on different ports.

Here’s some examples:

Inventory file:

[local]  
localhost

[prod]  
web01 ansible\_ssh\_host=xx.xx.xx.xx ansible\_ssh\_port=2222 ansible\_ssh\_private\_key\_file=sshkey  
web02 ansible\_ssh\_host=xx.xx.xx.xx ansible\_ssh\_port=2223 ansible\_ssh\_private\_key\_file=sshkey

[balancers]  
lb01 ansible\_ssh\_host=xx.xx.xx.xx ansible\_ssh\_private\_key\_file=sshkey ansible\_python\_interpreter=/usr/local/bin/python2.7  
lb02 ansible\_ssh\_host=xx.xx.xx.xx ansible\_ssh\_private\_key\_file=sshkey ansible\_python\_interpreter=/usr/local/bin/python2.7

playbook:

- hosts: balancers  
user: root  
tags: deploy  
tasks: 

- hosts: prod  
serial: 1  
tasks:

- name: Upload DB dump to prod  
copy: src=files/db.sql dest=/tmp/db.sql  
tags: deploy

- name: disable the backend in relayd  
shell: /usr/sbin/relayctl host disable {{ ansible\_default\_ipv4.address }}  
delegate\_to: “{{ item }}”  
with\_items: groups.balancers  
tags: deploy

Thanks in advance.

/Juri
