aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/playbooks/04-disk-image.yaml
blob: bc0016ed4090312271459ad006fafe4a9d7e4c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- hosts: virl
  remote_user: virl
  tasks:
  - name: Create server image directory
    file: path=/home/virl/virl-server-image state=directory mode=0755
  - name: Copy UBUNTU server image
    copy: src=/home/virl/virl-server-image/packer-csit-ubuntu-16.04.1_2017-02-23_1.8-qemu dest=/home/virl/virl-server-image/packer-csit-ubuntu-16.04.1_2017-02-23_1.8-qemu owner=virl group=virl mode=644
  - name: Copy CENTOS server image
    copy: src=/home/virl/virl-server-image/packer-csit-centos-7.3-1611_2017-02-23_1.4-qemu dest=/home/virl/virl-server-image/packer-csit-centos-7.3-1611_2017-02-23_1.4-qemu owner=virl group=virl mode=644
# TODO: Need to make this conditional, and find a good source for the image.
  - name: Import UBUNTU server image into glance
    shell: virl_uwm_client image-create --subtype server --release csit-ubuntu-16.04.1_2017-02-23_1.8 --image-on-server /home/virl/virl-server-image/packer-csit-ubuntu-16.04.1_2017-02-23_1.8-qemu
  - name: Import CENTOS server image into glance
    shell: virl_uwm_client image-create --subtype server --release csit-centos-7.3-1611_2017-02-23_1.4 --image-on-server /home/virl/virl-server-image/packer-csit-centos-7.3-1611_2017-02-23_1.4-qemu
- hosts: virl
  remote_user: testuser
  sudo: yes
  tasks:
  - name: Create common directory
    file: path=/nfs/common state=directory mode=0755
  - name: Create Nested VM directory
    file: path=/nfs/common/nested-vm state=directory mode=0755
  - name: Copy Nested VM image
    copy: src=/home/virl/virl-server-image/csit-nested-1.6.img dest=/nfs/common/nested-vm/csit-nested-1.6.img owner=virl group=virl mode=644
  - name: NFS symlink
    shell: ln -s /nfs/common/nested-vm-current.img.disabled /nfs/common/nested-vm/csit-nested-1.6.img