From ab9fb8bed590af37cba92cf5b0517fd6fdc04674 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 22 Dec 2017 14:05:57 +0000 Subject: [PATCH] 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 --- xci/playbooks/get-opnfv-scenario-requirements.yml | 12 ++++++------ 1 file 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: -- 2.16.6