From 316ce29ccbcf75e81f369e85c25c2410803955e4 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 12 Feb 2021 20:39:22 +0700 Subject: [PATCH] Fix pxe docker compose --- metal/group_vars/all.yml | 2 +- metal/roles/pxe-server/tasks/main.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/metal/group_vars/all.yml b/metal/group_vars/all.yml index 38f2866c..19ca9444 100644 --- a/metal/group_vars/all.yml +++ b/metal/group_vars/all.yml @@ -1,4 +1,4 @@ -iso_url: "https://releases.ubuntu.com/20.04.2/ubuntu-20.04.2-live-server-amd64.iso" +iso_url: "https://mirrors.nhanhoa.com/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso" subnet: "192.168.1.0" netmask: "255.255.255.0" diff --git a/metal/roles/pxe-server/tasks/main.yml b/metal/roles/pxe-server/tasks/main.yml index 911fbc69..c2c0ec87 100644 --- a/metal/roles/pxe-server/tasks/main.yml +++ b/metal/roles/pxe-server/tasks/main.yml @@ -10,11 +10,11 @@ - name: Download ISO get_url: url: "{{ iso_url }}" - dest: "{{ role_path }}/build/images/ubuntu.iso" + dest: "{{ role_path }}/build/images/centos8.iso" - name: Mount the ISO mount: - src: "{{ role_path }}/build/images/ubuntu.iso" + src: "{{ role_path }}/build/images/centos8.iso" path: "{{ role_path }}/build/mnt" fstype: iso9660 opts: loop,ro @@ -49,4 +49,6 @@ - name: Start PXE server docker_compose: - project_src: "{{ role_path }}/files/pxe-servers" + project_src: "{{ role_path }}/build" + build: yes + delegate_to: localhost