From d3af386f4a5275f9cdcf05878d370f29fb7ac940 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sun, 13 Sep 2015 21:02:51 +0200 Subject: [PATCH] Revisioned again configuration of epoptes-client. --- roles/domain/tasks/epoptes.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/roles/domain/tasks/epoptes.yml b/roles/domain/tasks/epoptes.yml index 36eb783..435aaaf 100644 --- a/roles/domain/tasks/epoptes.yml +++ b/roles/domain/tasks/epoptes.yml @@ -28,15 +28,18 @@ when: role == 'client' and epo_srv_name|changed sudo: yes -- name: Prendo il certificato - shell: "test -f /etc/epoptes/server.crt || /usr/sbin/epoptes-client -c" - sudo: yes +- name: Verifica certificato + file: + path: /etc/epoptes/server.crt + status: file when: role == 'client' and epo_srv_name|changed - register: crt_epo_srv + register: crt_epo_exists + ignore_errors: yes -- name: Riavvio il client alla ricezione di un certificato. - shell: /bin/true - when: role == 'client' and crt_epo_srv|changed +- name: Prendo il certificato + shell: /usr/sbin/epoptes-client -c + sudo: yes + when: role == 'client' and crt_epo_exists|failed notify: - reboot