From: Markos Chandras Date: Fri, 22 Dec 2017 14:05:57 +0000 (+0000) Subject: xci: scenarios: Fix location when copying scenarios to roles X-Git-Tag: 6.0.0~191 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F49555%2F5;p=releng-xci.git 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 --- 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: