| --- |
| - hosts: haproxy2 |
| vars: |
| haproxy_socket: '/var/lib/haproxy/stats' |
| haproxy_chroot: '/var/lib/haproxy' |
| haproxy_user: 'haproxy' |
| haproxy_group: 'haproxy' |
| haproxy_frontend_name: 'all' |
| haproxy_frontend_bind_address: '*' |
| haproxy_frontend_port: 9001 |
| haproxy_frontend_mode: 'http' |
| haproxy_backend_name: 'app' |
| haproxy_backend_mode: 'http' |
| haproxy_backend_balance_method: 'roundrobin' |
| haproxy_backend_httpchk: '' |
| haproxy_backend_servers: |
| - name: dc_1_rmp0 |
| address: 172.31.30.210:9001 |
| - name: dc_1_rmp1 |
| address: 172.31.27.249:9001 |
| - name: dc_1_rmp2 |
| address: 172.31.28.229:9001 |
| - name: dc_1_rmp3 |
| address: 172.31.21.163:9001 |
| - name: dc_1_rmp4 |
| address: 172.31.28.183:9001 |
| - name: dc_1_rmp5 |
| address: 172.31.27.153:9001 |
| - name: dc_1_rmp6 |
| address: 172.31.21.127:9001 |
| - name: dc_2_rmp0 |
| address: 172.31.23.241:9001 |
| - name: dc_2_rmp1 |
| address: 172.31.22.237:9001 |
| - name: dc_2_rmp2 |
| address: 172.31.22.85:9001 |
| - name: dc_2_rmp3 |
| address: 172.31.26.205:9001 |
| - name: dc_2_rmp4 |
| address: 172.31.27.45:9001 |
| - name: dc_2_rmp5 |
| address: 172.31.16.106:9001 |
| - name: dc_2_rmp6 |
| address: 172.31.24.230:9001 |
| |
| roles: |
| - ansible-role-haproxy |
| |
| # tasks: |
| # - get_url: |
| # url: http://www.haproxy.org/download/1.5/src/haproxy-1.5.19.tar.gz |
| # dest: haproxy-1.5.19.tar.gz |
| # |
| # - unarchive: |
| # src: haproxy-1.5.19.tar.gz |
| # dest: /tmp/ |
| # |
| # - yum: |
| # name: "@Development Tools" |
| # state: present |
| # |
| # - shell: sudo make install |
| # args: |
| # chdir: /tmp/haproxy-1.5.19 |
| # |