CORD-1151
Make cord_dir and cord_profile_dir local to config node
use head_* and config_* prefixes to avoid hardcoding paths
config-side ssh key generation+
fix frontend & mock builds
[build] group in inventory
fix inventory strangeness
raise privs when creating ssh_pki_dir
move admin-openrc.sh.j2 to cord-profile
add copy-cord-playbook.yml, clarify where it runs
fix paths for head_cord_profile_dir with mock/frontend
use /opt/cord_profile/admin-openrc.sh rather than ~/admin-openrc.sh
install pki
make comment in do-enlist-compute-node accurate, set correct interface
remove hardcoded credential path
logging and ssh key fixes
Change-Id: Ie7560c911dce1558e09806c9997884dfbd475e9c
diff --git a/roles/repo/defaults/main.yml b/roles/repo/defaults/main.yml
index b2af59f..6ef6c5a 100644
--- a/roles/repo/defaults/main.yml
+++ b/roles/repo/defaults/main.yml
@@ -1,7 +1,7 @@
---
# repo/defaults/main.yml
-cord_dir: "{{ ansible_user_dir + '/cord' }}"
+config_cord_dir: "{{ ansible_user_dir + '/cord' }}"
repo_dl_url: "https://storage.googleapis.com/git-repo-downloads/repo"
# This is for repo v1.23, and will change, as repo_dl_url unfortunately lacks a version...
diff --git a/roles/repo/tasks/main.yml b/roles/repo/tasks/main.yml
index 779e406..58cafa3 100644
--- a/roles/repo/tasks/main.yml
+++ b/roles/repo/tasks/main.yml
@@ -13,25 +13,25 @@
- name: Create CORD directory
file:
- dest: "{{ cord_dir }}"
+ dest: "{{ config_cord_dir }}"
state: directory
- name: Init CORD repos (master branch) using repo
command: "/usr/local/bin/repo init -u {{ repo_manifest_url }} -b master -g build,onos,orchestration"
args:
- chdir: "{{ cord_dir }}"
- creates: "{{ cord_dir }}/.repo"
+ chdir: "{{ config_cord_dir }}"
+ creates: "{{ config_cord_dir }}/.repo"
- name: Synchronize CORD repos using repo
command: "repo sync"
args:
- chdir: "{{ cord_dir }}"
- creates: "{{ cord_dir }}/build"
+ chdir: "{{ config_cord_dir }}"
+ creates: "{{ config_cord_dir }}/build"
- name: Download specific gerrit changesets using repo
command: "/usr/local/bin/repo download {{ item.path }} {{ item.revision }}"
args:
- chdir: "{{ cord_dir }}"
+ chdir: "{{ config_cord_dir }}"
with_items: "{{ gerrit_changesets }}"
tags:
- skip_ansible_lint # usually won't be run, except during dev