diff options
author | Manuel Buil <mbuil@suse.com> | 2018-10-03 18:18:05 +0200 |
---|---|---|
committer | Manuel Buil <mbuil@suse.com> | 2018-10-03 19:44:03 +0200 |
commit | f54c78e2c36d7db53260bc868b5b538cb8e9d911 (patch) | |
tree | f4a7954c1e283a55eb051df3043aa82efc479713 /xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml | |
parent | 6158af2f83842e3d6bdcba8c7ba93b4116b405ae (diff) |
[Baremetal] - Change roles and playbooks names
A few playbooks and the create-vm-nodes role should change the name to
reflect the new reality once the baremetal patches are merged. The
playbooks that must change the name are:
- xci-prepare-virtual.yml
- xci-create-virtual.yml
Change-Id: Iaed1f93561fa9d39c7916e0643a5445cdddf4f97
Signed-off-by: Manuel Buil <mbuil@suse.com>
Diffstat (limited to 'xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml')
-rw-r--r-- | xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml b/xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml new file mode 100644 index 00000000..a227bc4f --- /dev/null +++ b/xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml @@ -0,0 +1,32 @@ +--- +- name: Download the {{ xci_distro }} image checksum file + get_url: + dest: "{{ xci_cache }}/deployment_image.qcow2.sha256.txt" + force: no + url: http://artifacts.opnfv.org/releng/xci/images/{{ xci_distro }}.qcow2.sha256.txt + timeout: 3000 +- name: Extract checksum + shell: awk '{print $1}' "{{ xci_cache }}/deployment_image.qcow2.sha256.txt" + register: _image_checksum +- fail: + msg: "Failed to get image checksum" + when: _image_checksum == '' +- set_fact: + image_checksum: "{{ _image_checksum.stdout }}" +- name: Download the {{ xci_distro }} image file + get_url: + url: http://artifacts.opnfv.org/releng/xci/images/{{ xci_distro }}.qcow2 + checksum: "sha256:{{ image_checksum }}" + timeout: 3000 + dest: "{{ xci_cache }}/deployment_image.qcow2" + force: no +- name: Set correct mode for deployment_image.qcow2 file + file: + path: "{{ xci_cache }}/deployment_image.qcow2" + mode: '0755' + owner: 'root' + group: 'root' + +- name: Create copy of original deployment image + shell: "cp {{ xci_cache }}/deployment_image.qcow2 {{ opnfv_image_path }}/opnfv.qcow2" + become: yes |