From 2634f651c95cf417f4b7689d3966845ec92d7251 Mon Sep 17 00:00:00 2001
From: shahaan <shahaan@gmail.com>
Date: Fri, 24 Oct 2014 11:13:57 +1100
Subject: [PATCH] Removed some redundant tasks.

---
 roles/easy-rsa-CA-client/tasks/buildClientCert.yml | 8 ++------
 roles/easy-rsa-CA-client/tasks/main.yml            | 4 ----
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/roles/easy-rsa-CA-client/tasks/buildClientCert.yml b/roles/easy-rsa-CA-client/tasks/buildClientCert.yml
index 599e91cc..7525599e 100644
--- a/roles/easy-rsa-CA-client/tasks/buildClientCert.yml
+++ b/roles/easy-rsa-CA-client/tasks/buildClientCert.yml
@@ -1,14 +1,10 @@
 --- 
-- 
-  delegate_to: "{{ server }}"
-  name: "Check if certificate exist"
-  register: cert
-  stat: "path=/etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.crt"
 - 
   delegate_to: "{{ server }}"
   name: "Creating Client certificate"
   shell: " cd /etc/easy-rsa/2.0; source ./vars; export EASY_RSA=\"${EASY_RSA:-.}\"; \"$EASY_RSA\"/pkitool --csr {{ inventory_hostname }} ;\"$EASY_RSA\"/pkitool --sign {{ inventory_hostname }}"
-  when: "cert.stat.exists  == false"
+  args:
+   creates: /etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.crt
 - 
   delegate_to: "{{ server }}"
   fetch: "src=/etc/easy-rsa/2.0/keys/{{ inventory_hostname }}.crt dest=certDir/ fail_on_missing=yes validate_md5=yes flat=yes"
diff --git a/roles/easy-rsa-CA-client/tasks/main.yml b/roles/easy-rsa-CA-client/tasks/main.yml
index 113c1521..73fc5d87 100644
--- a/roles/easy-rsa-CA-client/tasks/main.yml
+++ b/roles/easy-rsa-CA-client/tasks/main.yml
@@ -1,7 +1,3 @@
 --- 
--
-  include: installEasyRsa.yml
--
-  include: copyConfigurationFile.yml
 - 
   include: buildClientCert.yml
-- 
GitLab