Comments (9)
What is the path of your DHCP config file, is it metal/roles/pxe_server/files/data/pxe-config/dhcpd.conf
, can you post the full file in that path?
Also can you post a link to your code, I don't see it on your profile.
from homelab.
Full path is as you expected metal/roles/pxe_server/files/data/pxe-config/dhcpd.conf
Hadn't pushed my code previously as I was just trying to get it to work. Just pushed to metal
branch
A bit more background -- previously I had been trying to run this on an Ubuntu VM I'm using as a jump box so it's in the same subnet as my lab. The dhcpd.conf does not render on the VM. However, if I try on my local machine, it does render correctly. It's weird because the grub.cfg template works fine on the VM.
Is there a dependency I might be missing on the VM?
dhcpd.conf with missing substitutions:
subnet {{ ansible_default_ipv4.network }} netmask {{ ansible_default_ipv4.netmask }} {
option routers {{ ansible_default_ipv4.gateway }};
range {{ ansible_default_ipv4.network | ansible.netcommon.ipmath(1) }} {{ ansible_default_ipv4.broadcast | ansible.netcommon.ipmath(-1) }};
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server {{ ansible_default_ipv4.address }};
if option architecture-type = 00:07 {
filename "grubx64.efi";
}
}
}
grub.cfg with successful substitutions:
menuentry 'ubuntu-20.04.3-live-server-amd64 (autoinstall)' --id=autoinstall {
echo "Loading Kernel..."
linux vmlinuz \
ip=dhcp \
url=http://10.2.1.100/iso/ubuntu-20.04.3-live-server-amd64.iso autoinstall \
ds="nocloud-net;seedfrom=http://10.2.1.100/" root=/dev/ram0 cloud-config-url=/dev/null
echo "Loading Ram Disk..."
initrd initrd
}
from homelab.
Does running the playbook with -vvv
show any other related info?
from homelab.
It also renders fine on my machine.
from homelab.
Does running the playbook with -vvv show any other related info?
Not really. I compared the task for dhcpd.conf
to the task for grub.cfg
and the logs look pretty much identical aside from the different paths.
from homelab.
run this on an Ubuntu VM I'm using as a jump box
Is it a clean VM? I can't replicate the issue so the VM might be the problem.
from homelab.
Is it a clean VM?
That's a fair point. I can definitely try a different one.
A side question --
My lab subnet is 10.2.0.0/16. I have my router set up as a DHCP server for the subnet, but only service addresses in range 10.2.1.100 - 10.2.1.200.
Will running the additional dhcp server for a different IP range (10.2.118.0/24) in the lab subnet cause problems? If so, how would you advise setting things up?
Thanks for your time!
from homelab.
The current setup is tested on a flat 192.168.1.0/24 network, which is the most common case, but you can always customize the parameters of the DHCP config if needed. If you worry about the DHCP server you can add a handler for Ansible to turn off the PXE server after the machines are booted (in my case the IP range is the same with my router so it doesn't matter much)
from homelab.
Seem like you got it working ahgraber/homelab-infra@426ff06, closing.
from homelab.
Related Issues (20)
- System-upgrade was removed HOT 1
- Add idm_admin creation to kanidm admin reset script? HOT 1
- gitea and 4 other services in a degraded state HOT 5
- Contact Point of AlertManager is absent HOT 5
- Adding a second dedicated network interface for longhorn replication HOT 4
- [Feature request] Add VPN egress HOT 3
- Kubernetes cluster unreachable: x509: certificate signed by unknown authority HOT 1
- Failed to install ArgoCD HOT 5
- Command: make tools, error HOT 2
- Getting errors on bootstrap phase with ApplicationSets HOT 1
- Cannot add master node HOT 3
- Add Infro PR Checks? HOT 1
- Not an Issue : Just a question about nodes HOT 1
- Question about cilium HOT 1
- cloudflare terraform deprecation and cloudflared failing HOT 1
- dex secret not found HOT 5
- [Suggestion] Replace terraform with opentofu HOT 1
- Issues Global-Secret Generated Secrets HOT 1
- ArgoCD Manifest error
- Argocd Apply Manifests Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homelab.