From ad9eaaca7fd57d14112b33b04640b1506e8f463e Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sat, 21 Aug 2021 10:59:51 +0000 Subject: [PATCH] Generate ISO file name automatically --- metal/roles/pxe-server/defaults/main.yml | 1 - metal/roles/pxe-server/tasks/main.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/metal/roles/pxe-server/defaults/main.yml b/metal/roles/pxe-server/defaults/main.yml index 9ae2e632..7c5b0b81 100644 --- a/metal/roles/pxe-server/defaults/main.yml +++ b/metal/roles/pxe-server/defaults/main.yml @@ -1,6 +1,5 @@ iso_url: "https://builds.coreos.fedoraproject.org/prod/streams/testing/builds/34.20210808.2.0/x86_64/fedora-coreos-34.20210808.2.0-live.x86_64.iso" iso_checksum: "sha256:8ec901fcb5bf9f05cf8046cbe7bce29e36600b7ec61165577c1b3c565b85425c" -iso_file_name: "fedora-coreos-34.20210808.2.0-live.x86_64.iso" os_name: CoreOS # TODO (optimize) Get timezone automatically from the controller diff --git a/metal/roles/pxe-server/tasks/main.yml b/metal/roles/pxe-server/tasks/main.yml index d6ae2b2d..bb0f7684 100644 --- a/metal/roles/pxe-server/tasks/main.yml +++ b/metal/roles/pxe-server/tasks/main.yml @@ -15,7 +15,7 @@ - name: Download ISO get_url: url: "{{ iso_url }}" - dest: "{{ role_path }}/files/images/{{ iso_file_name }}" + dest: "{{ role_path }}/files/images/{{ iso_url | basename }}" checksum: "{{ iso_checksum }}" register: iso