Closed bretton closed 1 year ago
There are three roles here. After pushing my roles to the github, I will probably do your first part.
There are three roles here. After pushing my roles to the github, I will probably do your first part.
I wrote the role. Linux. Running QEMU with (or without) ISO and connecting block devices (HDD/SSD) of the host machine. Using this role, you can run ISO with installers of various operating systems (including those with a graphical interface) and various service disks.
For your project, you need to add a role that first builds MfsBSD with new options, ssh keys, and archives of FreeBSD itself.
But I see the need to first create roles to create a Linux rescue ISO (based on different Linux distributions with different package managers).
awesome stuff, will have another look when I have some capacity.
I'll probably try a simpler version to gain some experience with ansible, which would connect to IP in rescue mode, download depenguin.me script and run it, then connect again to qemu instance, and run the configured unattended bsdinstall script, then reboot.
nothing needed to configure for mfsbsd or downloading ISOs, it's all configured already.
Your script mfsbsd-13.1-script/depenguinme.sh
also downloads mfsbsd image:
https://github.com/depenguin-me/mfsbsd-13.1-script/blob/ae8e1d3433805bf63a867475b7f59cce83237e74/depenguinme.sh#L232-L233
You are also manually trying to find block devices. https://github.com/depenguin-me/mfsbsd-13.1-script/blob/ae8e1d3433805bf63a867475b7f59cce83237e74/depenguinme.sh#L235-L244
You can use bsdinstall, but this is a manual mode that cannot be automated...
Leave the shell script mfsbsd-13.1-script/depenguinme.sh
as is. Perhaps obvious issues will have to be fixed.
Ansible roles will live their own separate lives.
Self-written scripts for installing FreeBSD from LiveCD FreeBSD will also live their own life.
Nothing prevents the authors from changing my Ansible role (click0/ansible-freebsd-install-on-zfs-lite) to fit their script options.
Your script
mfsbsd-13.1-script/depenguinme.sh
also downloads mfsbsd image:
yup so there's no need for ansible to do the same, just to run the script.
You are also manually trying to find block devices.
this is because a cdrom might exist on sdb in the rescue system
You can use bsdinstall, but this is a manual mode that cannot be automated...
this isn't accurate, see unattended bsdinstall https://depenguin.me/bsdinstall.html
in this case ansible would simply write values to the depenguin_settings.sh
file and run depenguin_bsdinstall.sh
. At least that's how I'd set it up. I wouldn't be locked into ansible, I could use same script with saltstack too.
Then I'm looking into building rescue ISOs on various Linux distributions.
And if you need my help with Ansible, you can tag me.
I have a working ansible setup here: https://github.com/depenguin-me/depenguinme-ansible
It uses the depenguin.me mfsbsd instance. Tested working with AX41, two spindle disks.
Still needs a bit of massaging to get post-install connect and updates to work.
Closing this, continue in depenguinme-ansible repo
outline for an ansible playbook which can provision a host, from rescue system to end server:
doing this requires multiple stages with different usernames, and removing ssh host keys at steps:
root@ip
, get script from site, run itmfsbsd@ip
root@ip
, cancel qemu, rebootuser@ip
for post-install setupIdeally a drop-in role for other ansible playbooks?