Add haproxy 1.5 repo and generate self signed ssl key
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
#This playbook will install haproxy and configure for rails servers
|
#This playbook will install haproxy and configure for rails servers
|
||||||
#
|
#
|
||||||
|
- name: Add haproxy repo
|
||||||
|
apt_repository: repo='ppa:vbernat/haproxy-1.5' state=present
|
||||||
|
|
||||||
- name: update apt cache
|
- name: update apt cache
|
||||||
apt: update_cache=yes cache_valid_time=3600
|
apt: update_cache=yes cache_valid_time=3600
|
||||||
|
|
||||||
@@ -15,5 +18,11 @@
|
|||||||
regexp='ENABLED=0'
|
regexp='ENABLED=0'
|
||||||
replace='ENABLED=1'
|
replace='ENABLED=1'
|
||||||
|
|
||||||
|
- name: Generate self signed key
|
||||||
|
shell: openssl req -new -newkey rsa:4096 -sha256 -subj '/CN=home/O=home LTD./C=US' -x509 -nodes -keyout /root/server.key -out /root/server.crt
|
||||||
|
|
||||||
|
- name: Create pem file
|
||||||
|
shell: cat /root/server.crt /root/server.key > /root/server.pem
|
||||||
|
|
||||||
- name: Restart haproxy
|
- name: Restart haproxy
|
||||||
service: name=haproxy state=restarted
|
service: name=haproxy state=restarted
|
||||||
|
|||||||
Reference in New Issue
Block a user