[CORD-2094] v2
Make SSH config key gen and copy not reliant on vagrant

Change-Id: I2df8e06b080321ff79a246381e93710479582457
(cherry picked from commit 39c9aa90a23c69682c67572ae96be09beecf57a7)
diff --git a/Makefile b/Makefile
index 91f92cd..24218ef 100644
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,7 @@
 VAGRANT_UP_PREREQS       ?=
 COPY_CORD_PREREQS        ?=
 CORD_CONFIG_PREREQS      ?=
-COPY_CONFIG_PREREQS      ?=
+CONFIG_SSH_KEY_PREREQS   ?=
 PREP_BUILDNODE_PREREQS   ?=
 PREP_HEADNODE_PREREQS    ?=
 DOCKER_IMAGES_PREREQS    ?=
@@ -204,7 +204,7 @@
 	$(ANSIBLE_PB) $(BUILD)/ansible/vagrant-ssh-install.yml $(LOGCMD)
 	touch $@
 
-$(M)/config-ssh-key: | $(M)/vagrant-up
+$(M)/config-ssh-key: | $(CONFIG_SSH_KEY_PREREQS)
 	$(ANSIBLE_PB) $(BUILD)/ansible/config-ssh-key.yml $(LOGCMD)
 	touch $@
 
diff --git a/ansible/roles/genconfig/templates/config.mk.j2 b/ansible/roles/genconfig/templates/config.mk.j2
index 2954e09..c872f2c 100644
--- a/ansible/roles/genconfig/templates/config.mk.j2
+++ b/ansible/roles/genconfig/templates/config.mk.j2
@@ -52,15 +52,15 @@
 {% if vagrant_up_prereqs is defined %}
 VAGRANT_UP_PREREQS      = $(M)/{{ vagrant_up_prereqs | join(" $(M)/") }}
 {% endif %}
+{% if config_ssh_key_prereqs is defined %}
+CONFIG_SSH_KEY_PREREQS      = $(M)/{{ config_ssh_key_prereqs | join(" $(M)/") }}
+{% endif %}
 {% if copy_cord_prereqs is defined %}
 COPY_CORD_PREREQS       = $(M)/{{ copy_cord_prereqs | join(" $(M)/") }}
 {% endif %}
 {% if cord_config_prereqs is defined %}
 CORD_CONFIG_PREREQS     = $(M)/{{ cord_config_prereqs | join(" $(M)/") }}
 {% endif %}
-{% if copy_config_prereqs is defined %}
-COPY_CONFIG_PREREQS     = $(M)/{{ copy_config_prereqs | join(" $(M)/") }}
-{% endif %}
 {% if prep_buildnode_prereqs is defined %}
 PREP_BUILDNODE_PREREQS  = $(M)/{{ prep_buildnode_prereqs | join(" $(M)/") }}
 {% endif %}
diff --git a/scenarios/cord/config.yml b/scenarios/cord/config.yml
index 3a93b18..a432f5a 100644
--- a/scenarios/cord/config.yml
+++ b/scenarios/cord/config.yml
@@ -46,6 +46,9 @@
 build_targets:
  - setup-automation
 
+config_ssh_key_prereqs:
+  - vagrant-ssh-install
+
 copy_cord_prereqs:
   - vagrant-ssh-install