Separate files needing GPL license
[csit.git] / resources / tools / testbed-setup / ansible / roles / cobbler / tasks / ubuntu-18.04.2-server-x86_64.yaml
1 ---
2 # file: roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml
3
4 - name: Download Ubuntu 18.04.2 Server x86_64 with check (sha256)
5   get_url:
6     url: 'http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.2-server-amd64.iso'
7     dest: '/mnt/ubuntu-18.04.2-server-amd64.iso'
8     checksum: 'sha256:a2cb36dc010d98ad9253ea5ad5a07fd6b409e3412c48f1860536970b073c98f5'
9   register: __iso_downloaded
10   tags:
11     - cobbler-import-image
12
13 - name: Create directory for Ubuntu 18.04.2 Server x86_64 mount
14   file:
15     path: '/mnt/ubuntu-18.04.2-server-x86_64'
16     state: 'directory'
17   register: __mount_directory_created
18   tags:
19     - cobbler-import-image
20
21 - name: Mount Ubuntu 18.04.2 Server x86_64 iso
22   mount:
23     src: '/mnt/ubuntu-18.04.2-server-amd64.iso'
24     path: '/mnt/ubuntu-18.04.2-server-x86_64'
25     fstype: 'iso9660'
26     opts: 'ro,loop'
27     state: mounted
28   when: __iso_downloaded and __mount_directory_created
29   tags:
30     - cobbler-import-image
31
32 - name: Run cobbler distro import for Ubuntu 18.04.2 Server x86_64
33   command: |
34       docker exec -i cobbler cobbler import
35       --path=/mnt/ubuntu-18.04.2-server-x86_64
36       --name=ubuntu-18.04.2-server-x86_64
37       --kickstart=/var/lib/cobbler/kickstarts/ubuntu-18.04.2-server-x86_64.seed
38   tags:
39     - cobbler-import-image