The Journey Begins

3 min 560 words
Laurent Wandrebeck Placeholder text describing the default author's avatar.

Everything has been plugged and is in my desk. The once called Tinkerbell machine is now homelab-gateway, still running the same Debian 12 OS installed by hand. I’ve got an Ansible playbook skeleton and a hand-made inventory.

 ansible -m ping -i inventory.yml gw
[WARNING]: No python interpreters found for host homelab-gateway (tried ['python3.12', 'python3.11', 'python3.10', 'python3.9', 'python3.8', 'python3.7', 'python3.6', '/usr/bin/python3', '/usr/libexec/platform-python', 'python2.7','/usr/bin/python', 'python'])

which of course blattently ends in failure. That means our first thing to do is to use the raw module to get python installed. Which leads to:

fatal: [homelab-gateway]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 127, "stderr": "Shared connection to closed.\r\n", "stderr_lines": ["Shared connection to closed."], "stdout": "bash: line 1: sudo: command not found\r\n", "stdout_lines": ["bash: line 1: sudo: command not found"]}

Ok, I’ll have to do that one by hand. One visudo later, things are better and python got installed. A couple packages later, let’s get to configuring the internal network interface. So here community.general.interfaces_file is to come to our rescue. But…examples are…well…is…unique. Oh well.

Now toying with MAAS. Which used to support WOL during 1.x days, but not anymore, because « Sleep-on-LAN » doesn’t exist. OK, I understand the point, but it’s better than nothing when you don’t have a BMC. I’ve updated an existing but apparently abandoned patch for master branch, I still need to check if this works or not. Dash isn’t supported either. I may try to add it, especially if that allows remote shutdown. I’ll have to dig into doc. Update: it does, and I found out a partial patch on launchpad. We’ll see if I can get something running.

So now we are up to two patches for MAAS, WoL and Dash. Meaning that using snap is a no-go, because it’s mounted RO etc. So let’s git clone and dive into how to build a Debian package. I’ve done a bunch of RPM, but deb is a new adventure. And things do not go as intended (what else ?). I’ll try to build the beast on a real Debian machine, for now I only have Fedora or Rocky Linux at hand.

Oh well, some packages are not available in Debian 12 in order to be able to build MAAS. I guess I’ll do a reinstall of the gateway with Ubuntu 23.10 (given my incredible pace, it’ll soon use 24.04 LTS) in order not to lose more time trying to get MAAS building properly. Cluster will run Debian 12 anyway, as a wonderful guy recently provided recipes for packer-maas so one can at last build and deploy Debian images with MAAS.

I’ve at last too recovered my codeberg account and updated the front page link. I uploaded partially patched MAAS too, btw. It’ll for sure need some trials and errors before we get a working something but at least it’s in (snail-like) progress.

It took me two months or so between the beginning of this post and its availability. Oh well. I hope you’re not that in a hurry.