summaryrefslogtreecommitdiffstats
path: root/xci/playbooks
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-26 15:26:43 +0100
committerMarkos Chandras <mchandras@suse.de>2018-03-26 15:47:46 +0100
commit8f3c33c97acc5fc10a83e7cc7635da67e2460769 (patch)
tree39b78c334e7e2235d37bdf37e460c2abbf41b95a /xci/playbooks
parentb31d148b5ae1216b2a209784ce11858caeddae4c (diff)
xci: get-opnfv-scenario-requirements: Fix local scenario sync
Commit 07747a53901e550280afb421b6fcbebc8994e93a ("xci: playbooks: Fix synchronization of external scenarios") fixed copying of external scenarios but broke internal ones because the regexp was wrong. The variable was not evaluated properly so nothing was replaced for internal scenarios. This also fixes a problem when the scenario and the role names differ so we make sure that the role with the correct name is created. Change-Id: Idd7590d972841b5c03286b34757d7325b863c6bf Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks')
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index 73590820..3c291384 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -68,7 +68,7 @@
- name: Plug in the scenario to XCI
synchronize:
src: "{{ scenario_path_default }}/{{ item.item.scenario }}/{{ item.item.role }}/"
- dest: "{{ role_path_default }}/{{ item.item.scenario }}"
+ dest: "{{ role_path_default }}/{{ item.item.role | basename }}"
when: item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control:
@@ -76,8 +76,8 @@
- name: Synchronize local changes to scenarios' master branch
synchronize:
- src: "{{ xci_path }}/xci/scenarios/{{ item.item.scenario }}/{{ item.item.role | replace('xci/scenarios/{{ item.item.scenario }}', '') }}/"
- dest: "{{ role_path_default }}/{{ item.item.scenario }}"
+ src: "{{ xci_path }}/xci/scenarios/{{ item.item.scenario }}/{{ item.item.role | replace('xci/scenarios/' ~ item.item.scenario ~ '/', '') }}/"
+ dest: "{{ role_path_default }}/{{ item.item.role | basename }}"
failed_when: false
when:
- item.stat.exists
@@ -89,7 +89,7 @@
- name: Plug in the scenario to XCI (fallback)
synchronize:
src: "{{ xci_path }}/{{ item.item.role }}/"
- dest: "{{ role_path_default }}/{{ item.item.scenario }}"
+ dest: "{{ role_path_default }}/{{ item.item.role | basename }}"
when: not item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control: