GHP publish
This commit is contained in:
22
roles/haproxy/tasks/package.yml
Normal file
22
roles/haproxy/tasks/package.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
- block:
|
||||
- name: install haproxy
|
||||
package:
|
||||
name: haproxy
|
||||
state: present
|
||||
|
||||
- name: add haproxy config
|
||||
copy:
|
||||
content: "{{ haproxy_config }}"
|
||||
dest: "/etc/haproxy/haproxy.cfg"
|
||||
notify:
|
||||
- restart haproxy
|
||||
when: haproxy_config is defined
|
||||
|
||||
- name: start haproxy service
|
||||
systemd:
|
||||
name: haproxy
|
||||
state: started
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
Reference in New Issue
Block a user