2 # file: roles/cobbler/tasks/ubuntu-18.04.2-server-x86_64.yaml
4 - name: Download Ubuntu 18.04.2 Server x86_64 with check (sha256)
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: cobbler-import-image
12 - name: Create directory for Ubuntu 18.04.2 Server x86_64 mount
14 path: '/mnt/ubuntu-18.04.2-server-x86_64'
16 register: __mount_directory_created
17 tags: cobbler-import-image
19 - name: Mount Ubuntu 18.04.2 Server x86_64 iso
21 src: '/mnt/ubuntu-18.04.2-server-amd64.iso'
22 path: '/mnt/ubuntu-18.04.2-server-x86_64'
26 when: __iso_downloaded and __mount_directory_created
27 tags: cobbler-import-image
29 - name: Run cobbler distro import for Ubuntu 18.04.2 Server x86_64
31 docker exec -i cobbler cobbler import
32 --path=/mnt/ubuntu-18.04.2-server-x86_64
33 --name=ubuntu-18.04.2-server-x86_64
34 --kickstart=/var/lib/cobbler/kickstarts/ubuntu-18.04.2-server-x86_64.seed
35 tags: cobbler-import-image