ref(playbook): Change to role-based structure
This commit is contained in:
parent
95fd68bed8
commit
b3b280fbe4
39 changed files with 635 additions and 601 deletions
36
roles/host/tasks/main.yaml
Normal file
36
roles/host/tasks/main.yaml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# # The subvol collection seems to be misbehaving?
|
||||
# # https://github.com/ansible-collections/community.general/issues/7098
|
||||
# # (and btrfs_subvol module working)
|
||||
# - name: Create void btrfs subvol
|
||||
# hosts: host
|
||||
# vars:
|
||||
# btrfs_target: 441a90a5-3da2-46ce-9e32-987569b746c9
|
||||
# mount_dir: /mnt/void
|
||||
# become: true
|
||||
# tasks:
|
||||
# - name: Create @voidroot subvool under root
|
||||
# community.general.btrfs_subvolume:
|
||||
# state: present
|
||||
# name: "/@"
|
||||
# filesystem_uuid: "{{ btrfs_root_uuid }}"
|
||||
# # - name: Mount /boot part into voidroot mount
|
||||
# - name: Mount btrfs subvol into mountdir
|
||||
# vars:
|
||||
# boot_dev_uuid:
|
||||
# ansible.posix.mount:
|
||||
# src: "{{ item.src }}"
|
||||
# path: "{{ item.path }}"
|
||||
# fstype: "{{ item.fstype }}"
|
||||
# state: mounted
|
||||
# with_items:
|
||||
# - { fstype: 'ext4', src: '/dev/mapper/{{ vgname }}-root', path: '{{ mount_dir }}/' }
|
||||
# # TODO: should take opts from fstab. Definitely needs 'boot' type option
|
||||
# - { fstype: 'vfat', src: '/dev/disk/by-uuid/{{ boot_dev_uuid }}', path: '{{ mount_dir }}/boot' }
|
||||
|
||||
- name: Unpack rootfs
|
||||
ansible.builtin.unarchive:
|
||||
remote_src: yes # we already downloaded it to the 'remote' system
|
||||
src: "{{ tarball_url }}"
|
||||
dest: "{{ mount_dir }}"
|
||||
# ONLY run if this file does not exist (could use any rootfs file to check)
|
||||
creates: "{{ mount_dir }}/etc/os-release"
|
||||
Loading…
Add table
Add a link
Reference in a new issue