summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-12-22 14:05:57 +0000
committerMarkos Chandras <mchandras@suse.de>2017-12-22 21:11:59 +0000
commitab9fb8bed590af37cba92cf5b0517fd6fdc04674 (patch)
tree3920d6cba9fb3ef584607a4f8ee3df7a21954ff1
parentb6907b858e215f358a16216a5095c9c6ed3520c4 (diff)
xci: scenarios: Fix location when copying scenarios to roles
The location where we were putting the scenarios was wrong as it was placing them in xci/playbooks/roles/$scenario/$scenario so in the end the Ansible couldn't find the role we were looking for. As a result, the role was never executed. Moreover, we can use the synchronize module instead of the shell which should be both faster and safer. Change-Id: I3d996652bb6a62d23e259da5674d94596dad4d8d Signed-off-by: Markos Chandras <mchandras@suse.de>
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index ec2f0d0e..b44c50b4 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -66,9 +66,9 @@
label: "{{ item.scenario }}"
- name: Plug in the scenario to XCI
- shell: >-
- cp -a {{ scenario_path_default }}/{{ item.item.scenario }}/{{ item.item.role }}
- {{ role_path_default }}/{{ item.item.scenario }}
+ synchronize:
+ src: "{{ scenario_path_default }}/{{ item.item.scenario }}/{{ item.item.role }}/"
+ dest: "{{ role_path_default }}/{{ item.item.scenario }}"
when: item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control:
@@ -87,9 +87,9 @@
label: "{{ item.item.scenario }}"
- name: Plug in the scenario to XCI (fallback)
- shell: >-
- cp -a {{ XCI_PATH }}/{{ item.item.role }}
- {{ role_path_default }}/{{ item.item.scenario }}
+ synchronize:
+ src: "{{ XCI_PATH }}/{{ item.item.role }}/"
+ dest: "{{ role_path_default }}/{{ item.item.scenario }}"
when: not item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control: