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]
|
||||
localhost
|
||||
localhost ansible_connection=local
|
||||
|
||||
[base]
|
||||
hulder
|
||||
loki
|
||||
|
|
|
@ -10,8 +10,5 @@
|
|||
roles:
|
||||
- base
|
||||
|
||||
- name: post-install setup
|
||||
hosts: base
|
||||
roles:
|
||||
- software
|
||||
- dotfiles
|
||||
- import_playbook: post-install.yaml
|
||||
when: not archiso_detected
|
||||
|
|
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
|
||||
- efibootmgr
|
||||
- git
|
||||
- git
|
||||
- iwd
|
||||
- linux-firmware
|
||||
- linux-lts
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
register: base_root_disks_info
|
||||
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
|
||||
ansible.builtin.set_fact:
|
||||
base_root_usable_mib: "{{ (base_root_disks_info.results | map(attribute='disk.size') | min | int) - 1 }}"
|
||||
|
@ -121,8 +126,6 @@
|
|||
vars:
|
||||
part_index: 1
|
||||
|
||||
- debug: var=base_root_partitions
|
||||
|
||||
#### swap
|
||||
- name: Create swap partition
|
||||
become: true
|
||||
|
@ -145,6 +148,7 @@
|
|||
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
|
||||
register: lsblk
|
||||
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
|
||||
set_fact:
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
- /etc/zfs
|
||||
- /boot/efi
|
||||
|
||||
- debug: var=base_efi_partitions
|
||||
|
||||
- name: Mount EFI
|
||||
ansible.posix.mount:
|
||||
path: /mnt/boot/efi
|
||||
|
|
|
@ -12,5 +12,4 @@
|
|||
- import_tasks: archinstall/prepare_chroot.yaml
|
||||
- import_tasks: archinstall/install_os.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
|
||||
|
|
|
@ -83,6 +83,7 @@ function enable_systemd_services {
|
|||
systemctl enable zfs.target
|
||||
systemctl enable zfs-import-cache.service
|
||||
systemctl enable zfs-mount.service
|
||||
systemctl enable systemd-resolved.service
|
||||
}
|
||||
|
||||
# do the stuff
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
- 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
|
||||
---
|
||||
- block:
|
||||
- name: pacman sync
|
||||
community.general.pacman:
|
||||
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:
|
||||
state: present
|
||||
name:
|
||||
- adwata-cursors
|
||||
- adwaita-cursors
|
||||
- blueman
|
||||
- feh
|
||||
- firefox
|
||||
|
@ -89,6 +89,7 @@
|
|||
become: true
|
||||
become_user: "{{ desktop_user }}"
|
||||
shell: pidof sway && SWAYSOCK=$(ls /run/user/*/sway-ipc.*.sock | head -n 1) swaymsg reload
|
||||
ignore_errors: true
|
||||
|
||||
- name: graphics | probe for graphics cards
|
||||
shell: lspci -nnk | grep -A 3 -E "VGA|3D"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue