68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
---
|
|
|
|
- name: Example task
|
|
hosts: host
|
|
tasks:
|
|
- name: Display facts
|
|
debug:
|
|
msg: "Facts collected: {{ ansible_facts }}"
|
|
|
|
# - name: Create void btrfs subvol
|
|
# hosts: host
|
|
# vars:
|
|
# - btrfs_target: 441a90a5-3da2-46ce-9e32-987569b746c9
|
|
# tasks:
|
|
# - name: Create @voidroot subvool under root
|
|
# community.general.btrfs_subvolume:
|
|
# name: /@voidroot
|
|
# filesystem_uuid: {{ btrfs_target }}
|
|
# 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: 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
|