system/play.yaml

35 lines
1.6 KiB
YAML

---
- name: Import host tasks
ansible.builtin.import_playbook: host.yaml
# Get python onto void - otherwise we can not interact through ansible
- name: Bootstrap void python
hosts: guest
gather_facts: false
tasks:
- name: install python
raw: test -e /usr/bin/python || xbps-install -y python
register: python_install
changed_when: "'installed successfully' in python_install.stdout"
- name: Import chroot guest tasks
ansible.builtin.import_playbook: guest.yaml
- name: Import chroot user management tasks
ansible.builtin.import_playbook: void_user.yaml
# - I chose to use booster instead of dracut
# - easiest way to achieve this is before installing `base-system`
# to `echo 'ignorepkg=dracut' >> /etc/xbps.d/ignore-dracut.conf`
# and manually install `booster` instead
# - Lastly, you need to manually create initramfs when in a chroot
# since booster will detect the host kernel instead. See here:
# <https://github.com/anatol/booster/issues/230>
# Essentially, run `booster build --kernel-version <krnl> myboot.img`
# with the version you want to build for.
# E.g. at time of writing, `booster build --kernel-version 6.12.13_1 myboot.img`.
# To find correct version, use the name of the `/usr/lib/modules/XYZ` XYZ dir.
#
# - do the remaining steps in the 'installation configuration' setup of the guide chroot guide
# - if wanted (and you should) uncomment wheel group in sudoers and set up a sudo-enabled user
# `useradd -m -G wheel -U -s /bin/zsh <username>` (if zsh is already installed)