Start working on the haproxy role

This commit is contained in:
Pierre-Yves Chibon 2014-12-07 23:35:44 +00:00
parent a4c0eb93be
commit 7adeb26a4d
5 changed files with 628 additions and 0 deletions

View file

@ -0,0 +1,33 @@
---
# Tasks to set up haproxy
- name: install needed packages
yum: pkg={{ item }} state=installed
with_items:
- haproxy
tags:
- packages
- name: install haproxy/cfg in prod
copy: src={{ item.file }}
dest={{ item.dest }}
owner=root group=root mode=0600
with_items:
- { file: haproxy.cfg, dest: /etc/haproxy/haproxy.cfg }
when: env != staging
- name: install haproxy.cfg in stg
copy: src={{ item.file }}
dest={{ item.dest }}
owner=root group=root mode=0600
with_items:
- { file: haproxy.cfg.stg, dest: /etc/haproxy/haproxy.cfg }
when: env == staging
- name: install limits.conf and 503.http
copy: src={{ item.file }}
dest={{ item.dest }}
owner=root group=root mode=0600
with_items:
- { file: limits.conf, dest: /etc/security/limits.conf }
- { file: 503.http, dest: /etc/haproxy/503.http }