Fixing when file does not exist

This commit is contained in:
2016-02-16 08:34:07 -05:00
parent 7aebbd515b
commit 18fcad80d9

View File

@@ -22,7 +22,7 @@
replace: dest='/etc/default/haproxy'
regexp='ENABLED=0'
replace='ENABLED=1'
when: not haproxy_init.exists
when: haproxy_init.exists == False
- name: ssl key exits
stat: path=/root/server.pem
@@ -31,11 +31,11 @@
- 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
when: not ssl.exists
when: ssl.exists == False
- name: Create pem file
shell: cat /root/server.crt /root/server.key > /root/server.pem
when: not ssl.exists
when: ssl.exists == False
- name: Restart haproxy
service: name=haproxy state=restarted