CORD-1151
mount the credentials dir into provisioner container
remove prep role (ssh key creation) as that now happens in
platform-install's ssh-* roles
Change-Id: Ie13e4f0ad5a2e3a67070b39acbe81c7bb73436d1
diff --git a/roles/compute-node/meta/main.yml b/roles/compute-node/meta/main.yml
index 2e50ead..047a60f 100644
--- a/roles/compute-node/meta/main.yml
+++ b/roles/compute-node/meta/main.yml
@@ -12,6 +12,5 @@
galaxy_tags:
- cord
dependencies:
- - { role: prep }
- { role: local-ubuntu-repository, when: ubuntu_apt_repo is defined }
- { role : docker }
diff --git a/roles/maas/templates/automation-compose.yml.j2 b/roles/maas/templates/automation-compose.yml.j2
index 237b430..1c2be8f 100644
--- a/roles/maas/templates/automation-compose.yml.j2
+++ b/roles/maas/templates/automation-compose.yml.j2
@@ -62,6 +62,7 @@
- "/etc/maas/ansible:/etc/maas/ansible"
- "/usr/local/share/ca-certificates:/usr/local/share/ca-certificates"
- "/opt/cord:/opt/cord"
+ - "/opt/credentials:/opt/credentials"
- "/etc/maas/.ssh:/etc/maas/.ssh"
restart: unless-stopped
diff --git a/roles/prep/tasks/main.yml b/roles/prep/tasks/main.yml
deleted file mode 100644
index 5194230..0000000
--- a/roles/prep/tasks/main.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Ensure key pair storage
- become: yes
- local_action: file path=/etc/maas/.ssh owner=root group=root mode="0755" state=directory
-
-- name: Validate existing key pair
- become: yes
- local_action: stat path=/etc/maas/.ssh/cord_rsa
- register: key_pair
-
-- name: Generate key pair
- become: yes
- local_action: command ssh-keygen -b 2048 -t rsa -N "" -C cord@cord.lab -f /etc/maas/.ssh/cord_rsa
- when: not key_pair.stat.exists
-
-- name: Ensure privacy of key pair
- become: yes
- local_action: file path="/etc/maas/.ssh/{{item.name}}" mode="{{item.mode}}" owner=root group=root
- with_items:
- - { "name": "cord_rsa", "mode": "0644" }
- - { "name": "cord_rsa.pub", "mode": "0644" }