54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
- name: Void prep
|
|
hosts: guest
|
|
become: true
|
|
vars:
|
|
ansible_chroot_exe: arch-chroot
|
|
disable_root_check: true
|
|
tasks:
|
|
# Prefer booster to dracut so make sure to never install it
|
|
- name: Ignore dracut
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/xbps.d/ignore-dracut.conf
|
|
line: ignorepkg=dracut
|
|
state: present
|
|
create: true # create file if absent
|
|
|
|
- name: Update xbps and system
|
|
community.general.xbps:
|
|
name:
|
|
- xbps
|
|
state: latest
|
|
update_cache: true
|
|
upgrade: true
|
|
|
|
- name: Install Base system
|
|
community.general.xbps:
|
|
name:
|
|
- base-system
|
|
state: present
|
|
|
|
- name: Get rid of temporary container metapackage
|
|
community.general.xbps:
|
|
name:
|
|
- base-container-full
|
|
state: absent
|
|
|
|
- name: Install booster
|
|
community.general.xbps:
|
|
name: booster
|
|
state: present
|
|
changed_when: True
|
|
notify: installed-booster
|
|
|
|
handlers:
|
|
- name: List installed linux kernels
|
|
find:
|
|
paths: "/usr/lib/modules"
|
|
register: found_kernel
|
|
listen: installed-booster
|
|
|
|
- name: Find kernel
|
|
debug:
|
|
msg: "{{ found_kernel['files'] | map(attribute='path') | map('regex_replace', '^.*/(.*)$', '\\1') | list }}"
|
|
listen: installed-booster
|
|
|