Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.yml « tasks « haproxy « roles « aws « lamp_haproxy - github.com/ansible/ansible-examples.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 637695ead98fbe4efef07396d764dd412c9bae58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
# This role installs HAProxy and configures it.

- name: Download and install haproxy
  yum:
    name: haproxy
    state: present

- name: Configure the haproxy cnf file with hosts
  template:
    src: haproxy.cfg.j2
    dest: /etc/haproxy/haproxy.cfg
  notify: restart haproxy

- name: Start the haproxy service
  service:
    name: haproxy
    state: started
    enabled: yes