From 2101d9e69a1cd1148cc884cff905b30a2bf89843 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 16 Feb 2016 09:50:01 -0500 Subject: [PATCH] Still trying to fix if server.pem does not exist --- roles/proxy/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/proxy/tasks/main.yml b/roles/proxy/tasks/main.yml index 7c9d180..9169398 100644 --- a/roles/proxy/tasks/main.yml +++ b/roles/proxy/tasks/main.yml @@ -22,7 +22,7 @@ replace: dest='/etc/default/haproxy' regexp='ENABLED=0' replace='ENABLED=1' - when: haproxy_init.exists == False + when: haproxy_init.stat.exists == True - 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: ssl.exists == False + when: ssl.stat.exists == False - name: Create pem file shell: cat /root/server.crt /root/server.key > /root/server.pem - when: ssl.exists == False + when: ssl.stat.exists == False - name: Restart haproxy service: name=haproxy state=restarted