CORD-1007 Generate certs and keys on the corddev VM

Change-Id: Iaf2f00ef0c7f3f7e5ee420208cfb5e3bec81e77e
diff --git a/build.gradle b/build.gradle
index 7c76ce8..94d5e02 100644
--- a/build.gradle
+++ b/build.gradle
@@ -181,9 +181,9 @@
 }
 
 task publishImages {
-    comps.each { name, spec -> if (spec.type == 'image') { 
-            dependsOn "publish" + name 
-          } 
+    comps.each { name, spec -> if (spec.type == 'image') {
+            dependsOn "publish" + name
+          }
     }
 }
 
@@ -210,9 +210,18 @@
   args = [ "-i", "genconfig/cord-inv", "-b", "--extra-vars", "@./genconfig/config.yml", "-m", "file", "-a", "state='directory' dest='$config.common.cord_dir' recurse='yes' owner='$config.headnode.ansible_user'", "head" ]
 }
 
+task PIinstallPKI(type: Exec) {
+  workingDir "platform-install"
+  executable = "ansible-playbook"
+  args = [ "-i", "../genconfig/cord-inv",
+    "--extra-vars", "@../genconfig/config.yml",
+    "pki-install-playbook.yml" ]
+}
+
 task PIprepPlatform(type: Exec) {
   dependsOn CopyCord
   dependsOn ChownCord
+  dependsOn PIinstallPKI
 
   def ansible_cmd = "cd $config.common.cord_dir/build/platform-install; ansible-playbook -i inventory/head-localhost --extra-vars @$config.common.cord_dir/build/genconfig/config.yml prep-platform-playbook.yml"
 
@@ -293,4 +302,3 @@
 task deploy  {
     dependsOn PIdeployPlatform
 }
-