Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ haproxy_dependencies:
state: latest
haproxy_install: []

# Some haproxy features will not work well with reload and require a hard
# restart instead. By default we will use the reloaded state and users can
# change the handler to perform a hard-restart when configuration change
# occurs by setting this to "restarted"
haproxy_reload_mode: reloaded

# global section
haproxy_global_log:
- address: /dev/log
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# handlers file for haproxy
---
- name: restart haproxy
- name: reload haproxy
service:
name: haproxy
state: restarted
state: "{{ haproxy_reload_mode }}"
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
group: "{{ item.group | default('root') }}"
mode: "{{ item.mode | default('0640') }}"
with_items: "{{ haproxy_ssl_map }}"
notify: restart haproxy
notify: reload haproxy
tags:
- configuration
- haproxy
Expand All @@ -75,7 +75,7 @@
group: root
mode: 0640
validate: 'haproxy -f %s -c'
notify: restart haproxy
notify: reload haproxy
tags:
- configuration
- haproxy
Expand Down