move some things, add more packages, successfully re-provisioned loki
This commit is contained in:
parent
0cfed2acdc
commit
fda8660515
11 changed files with 42 additions and 15 deletions
9
inventory/host_vars/loki.yaml
Normal file
9
inventory/host_vars/loki.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
ansible_user: root
|
||||||
|
ansible_host: 10.4.0.57
|
||||||
|
|
||||||
|
base_root_swap_mib: 0
|
||||||
|
base_root_efi_mib: 512
|
||||||
|
base_root_free_percent: 1
|
||||||
|
base_root_disks:
|
||||||
|
- /dev/disk/by-id/ata-Samsung_SSD_850_EVO_M.2_500GB_S24CNWAG406255D
|
|
@ -1,5 +1,6 @@
|
||||||
[all]
|
[all]
|
||||||
localhost
|
localhost ansible_connection=local
|
||||||
|
|
||||||
[base]
|
[base]
|
||||||
hulder
|
hulder
|
||||||
|
loki
|
||||||
|
|
|
@ -10,8 +10,5 @@
|
||||||
roles:
|
roles:
|
||||||
- base
|
- base
|
||||||
|
|
||||||
- name: post-install setup
|
- import_playbook: post-install.yaml
|
||||||
hosts: base
|
when: not archiso_detected
|
||||||
roles:
|
|
||||||
- software
|
|
||||||
- dotfiles
|
|
||||||
|
|
5
playbooks/post-install.yaml
Normal file
5
playbooks/post-install.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
- name: post-install setup
|
||||||
|
hosts: base
|
||||||
|
roles:
|
||||||
|
- software
|
||||||
|
- dotfiles
|
|
@ -16,6 +16,7 @@
|
||||||
- base-devel
|
- base-devel
|
||||||
- efibootmgr
|
- efibootmgr
|
||||||
- git
|
- git
|
||||||
|
- git
|
||||||
- iwd
|
- iwd
|
||||||
- linux-firmware
|
- linux-firmware
|
||||||
- linux-lts
|
- linux-lts
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
register: base_root_disks_info
|
register: base_root_disks_info
|
||||||
loop: "{{ base_root_disks | list }}"
|
loop: "{{ base_root_disks | list }}"
|
||||||
|
|
||||||
|
- name: partition | ensure efi is not mounted
|
||||||
|
mount:
|
||||||
|
path: /mnt/boot/efi
|
||||||
|
state: unmounted
|
||||||
|
|
||||||
- name: Calculate maximum usable disk space
|
- name: Calculate maximum usable disk space
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
base_root_usable_mib: "{{ (base_root_disks_info.results | map(attribute='disk.size') | min | int) - 1 }}"
|
base_root_usable_mib: "{{ (base_root_disks_info.results | map(attribute='disk.size') | min | int) - 1 }}"
|
||||||
|
@ -121,8 +126,6 @@
|
||||||
vars:
|
vars:
|
||||||
part_index: 1
|
part_index: 1
|
||||||
|
|
||||||
- debug: var=base_root_partitions
|
|
||||||
|
|
||||||
#### swap
|
#### swap
|
||||||
- name: Create swap partition
|
- name: Create swap partition
|
||||||
become: true
|
become: true
|
||||||
|
@ -145,6 +148,7 @@
|
||||||
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
|
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
|
||||||
register: lsblk
|
register: lsblk
|
||||||
loop: "{{ parted_create.results | map(attribute='disk.dev') }}"
|
loop: "{{ parted_create.results | map(attribute='disk.dev') }}"
|
||||||
|
when: base_root_swap_mib is defined and base_root_swap_mib|int > 0
|
||||||
|
|
||||||
- name: Store swap partition devices
|
- name: Store swap partition devices
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
- /etc/zfs
|
- /etc/zfs
|
||||||
- /boot/efi
|
- /boot/efi
|
||||||
|
|
||||||
|
- debug: var=base_efi_partitions
|
||||||
|
|
||||||
- name: Mount EFI
|
- name: Mount EFI
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
path: /mnt/boot/efi
|
path: /mnt/boot/efi
|
||||||
|
|
|
@ -12,5 +12,4 @@
|
||||||
- import_tasks: archinstall/prepare_chroot.yaml
|
- import_tasks: archinstall/prepare_chroot.yaml
|
||||||
- import_tasks: archinstall/install_os.yaml
|
- import_tasks: archinstall/install_os.yaml
|
||||||
- import_tasks: archinstall/postinstall_snapshot.yaml
|
- import_tasks: archinstall/postinstall_snapshot.yaml
|
||||||
- meta: end_play # pull again after reboot to resume provisioning
|
|
||||||
when: archiso_detected and base_root_disks is defined
|
when: archiso_detected and base_root_disks is defined
|
||||||
|
|
|
@ -83,6 +83,7 @@ function enable_systemd_services {
|
||||||
systemctl enable zfs.target
|
systemctl enable zfs.target
|
||||||
systemctl enable zfs-import-cache.service
|
systemctl enable zfs-import-cache.service
|
||||||
systemctl enable zfs-mount.service
|
systemctl enable zfs-mount.service
|
||||||
|
systemctl enable systemd-resolved.service
|
||||||
}
|
}
|
||||||
|
|
||||||
# do the stuff
|
# do the stuff
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
- import_tasks: software/minimal.yaml
|
---
|
||||||
- import_tasks: software/desktop.yaml
|
- block:
|
||||||
- import_tasks: software/graphics.yaml
|
- name: pacman sync
|
||||||
- import_tasks: software/dev.yaml
|
community.general.pacman:
|
||||||
- import_tasks: software/gamedev.yaml
|
update_cache: true
|
||||||
|
|
||||||
|
- import_tasks: software/minimal.yaml
|
||||||
|
- import_tasks: software/desktop.yaml
|
||||||
|
- import_tasks: software/graphics.yaml
|
||||||
|
- import_tasks: software/dev.yaml
|
||||||
|
- import_tasks: software/gamedev.yaml
|
||||||
|
when: not archiso_detected
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
name:
|
name:
|
||||||
- adwata-cursors
|
- adwaita-cursors
|
||||||
- blueman
|
- blueman
|
||||||
- feh
|
- feh
|
||||||
- firefox
|
- firefox
|
||||||
|
@ -89,6 +89,7 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ desktop_user }}"
|
become_user: "{{ desktop_user }}"
|
||||||
shell: pidof sway && SWAYSOCK=$(ls /run/user/*/sway-ipc.*.sock | head -n 1) swaymsg reload
|
shell: pidof sway && SWAYSOCK=$(ls /run/user/*/sway-ipc.*.sock | head -n 1) swaymsg reload
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
- name: graphics | probe for graphics cards
|
- name: graphics | probe for graphics cards
|
||||||
shell: lspci -nnk | grep -A 3 -E "VGA|3D"
|
shell: lspci -nnk | grep -A 3 -E "VGA|3D"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue