ansible-lint --fix

This commit is contained in:
Mark Riedesel 2024-11-22 10:45:41 -06:00
parent 5634cd32d3
commit faa046aa21
21 changed files with 181 additions and 179 deletions

View file

@ -1,6 +1,7 @@
---
- hosts: all - hosts: all
become: true become: true
tasks: tasks:
- name: is this a livecd? - name: Is this a livecd?
debug: ansible.builtin.debug:
msg: "{{ ansible_nodename }} {{ ansible_nodename == 'archiso' }}" msg: "{{ ansible_nodename }} {{ ansible_nodename == 'archiso' }}"

View file

@ -1,10 +1,10 @@
--- ---
- name: detect archinso environment - name: Detect archinso environment
hosts: all hosts: all
roles: roles:
- detect_archiso - detect_archiso
- name: provision base archlinux installation - name: Provision base archlinux installation
hosts: base hosts: base
tags: base tags: base
roles: roles:

View file

@ -1,4 +1,5 @@
- name: post-install setup ---
- name: Post-install setup
hosts: base hosts: base
roles: roles:
- software - software

View file

@ -1,11 +1,11 @@
--- ---
- name: Inspect EFI boot partitions - name: Inspect EFI boot partitions
become: true become: true
command: "blkid {{ item }}" ansible.builtin.command: "blkid {{ item }}"
loop: "{{ base_efi_partitions | default([]) }}" loop: "{{ base_efi_partitions | default([]) }}"
register: blkid register: blkid
- name: Format EFI partitions fat32 - name: Format EFI partitions fat32
command: "mkfs.vfat -v -F 32 -n EFI {{ item.item }}" ansible.builtin.command: "mkfs.vfat -v -F 32 -n EFI {{ item.item }}"
loop: "{{ blkid.results | rejectattr('stdout', 'contains', 'TYPE=\"vfat\"') }}" loop: "{{ blkid.results | rejectattr('stdout', 'contains', 'TYPE=\"vfat\"') }}"
register: mkfs_vfat_efi register: mkfs_vfat_efi

View file

@ -1,16 +1,18 @@
--- ---
- name: Check for existing zroot zfs volume - name: Check for existing zroot zfs volume
command: zpool list -Ho name zroot ansible.builtin.command: zpool list -Ho name zroot
register: zroot_check register: zroot_check
ignore_errors: true ignore_errors: true
- block: - when: zroot_check.rc != 0
block:
- name: Initialize disk device to id table - name: Initialize disk device to id table
set_fact: ansible.builtin.set_fact:
partition_device_to_ids: {} partition_device_to_ids: {}
- name: Create disk device to id table - name: Create disk device to id table
set_fact: ansible.builtin.set_fact:
partition_device_to_ids: >- partition_device_to_ids: >-
{{ {{
partition_device_to_ids partition_device_to_ids
@ -18,12 +20,12 @@
}} }}
with_items: "{{ base_partitions_by_id | dict2items }}" with_items: "{{ base_partitions_by_id | dict2items }}"
- debug: - ansible.builtin.debug:
var: base_root_partitions | map('extract', partition_device_to_ids) | map('first') var: base_root_partitions | map('extract', partition_device_to_ids) | map('first')
- name: Create zroot volume - name: Create zroot volume
become: true become: true
command: >- ansible.builtin.command: >-
zpool create -f -o ashift=12 zpool create -f -o ashift=12
-o autotrim=on -o autotrim=on
-O devices=off -O devices=off
@ -38,8 +40,6 @@
zroot {{ mirror }} {{ base_root_partitions | map('extract', partition_device_to_ids) | map('first') | list | join(' ') }} zroot {{ mirror }} {{ base_root_partitions | map('extract', partition_device_to_ids) | map('first') | list | join(' ') }}
vars: vars:
mirror: "{{ 'mirror' if base_root_partitions | length > 1 else '' }}" mirror: "{{ 'mirror' if base_root_partitions | length > 1 else '' }}"
when: zroot_check.rc != 0
- name: Create zroot/ROOT and zroot/DATA volumes - name: Create zroot/ROOT and zroot/DATA volumes
community.general.zfs: community.general.zfs:
name: "zroot/{{ item }}" name: "zroot/{{ item }}"
@ -64,7 +64,6 @@
mountpoint: /home mountpoint: /home
- name: Export zroot pool - name: Export zroot pool
command: zpool export zroot ansible.builtin.command: zpool export zroot
- name: Import zroot pool (-R /mnt) - name: Import zroot pool (-R /mnt)
command: zpool import -R /mnt zroot -N ansible.builtin.command: zpool import -R /mnt zroot -N

View file

@ -1,12 +1,12 @@
--- ---
- name: Initialize swap space - name: Initialize swap space
become: true become: true
command: "blkid {{item}}" ansible.builtin.command: "blkid {{item}}"
loop: "{{ base_swap_partitions | default([]) }}" loop: "{{ base_swap_partitions | default([]) }}"
register: blkid register: blkid
- name: Swap devices without swap filesystems present - name: Swap devices without swap filesystems present
become: true become: true
command: "mkswap --verbose {{item.item}}" ansible.builtin.command: "mkswap --verbose {{item.item}}"
loop: "{{ blkid.results | rejectattr('stdout', 'contains', 'TYPE=\"swap\"') }}" loop: "{{ blkid.results | rejectattr('stdout', 'contains', 'TYPE=\"swap\"') }}"
register: mkswap register: mkswap

View file

@ -1,14 +1,14 @@
--- ---
- name: archinstall | install os | check for presence of previously pacstrapped /mnt - name: archinstall | install os | check for presence of previously pacstrapped /mnt
stat: ansible.builtin.stat:
path: /mnt/usr/lib path: /mnt/usr/lib
register: existing_pacstrap register: existing_pacstrap
- debug: - ansible.builtin.debug:
var: existing_pacstrap var: existing_pacstrap
- name: archinstall | install os | pacstrap - name: archinstall | install os | pacstrap
shell: "pacstrap /mnt {{ packages | join(' ') }}" ansible.builtin.command: "pacstrap /mnt {{ packages | join(' ') }}"
vars: vars:
packages: packages:
- ansible - ansible
@ -26,56 +26,54 @@
when: not existing_pacstrap.stat.exists when: not existing_pacstrap.stat.exists
- name: archinstall | install os | copy pacman mirrorlist - name: archinstall | install os | copy pacman mirrorlist
copy: ansible.builtin.copy:
remote_src: true remote_src: true
src: /etc/pacman.d/mirrorlist src: /etc/pacman.d/mirrorlist
dest: /mnt/etc/pacman.d/mirrorlist dest: /mnt/etc/pacman.d/mirrorlist
- name: archinstall | install os | propagate root authorized keys - name: archinstall | install os | propagate root authorized keys
copy: ansible.builtin.copy:
remote_src: true remote_src: true
src: /root/.ssh/authorized_keys src: /root/.ssh/authorized_keys
dest: /mnt/root/.ssh/authorized_keys dest: /mnt/root/.ssh/authorized_keys
- name: archinstall | install os | passwordless sudo for group wheel - name: archinstall | install os | passwordless sudo for group wheel
copy: ansible.builtin.copy:
content: "%wheel ALL=(ALL) NOPASSWD: ALL" content: "%wheel ALL=(ALL) NOPASSWD: ALL"
dest: /mnt/etc/sudoers.d/wheel-group-nopasswd dest: /mnt/etc/sudoers.d/wheel-group-nopasswd
- name: archinstall | install os | set timezone - name: archinstall | install os | set timezone
file: ansible.builtin.file:
src: /usr/share/zoneinfo/US/Central src: /usr/share/zoneinfo/US/Central
dest: /mnt/etc/localtime dest: /mnt/etc/localtime
state: link state: link
- name: archinstall | install os | enable en_US locales - name: archinstall | install os | enable en_US locales
command: sed -i 's/^#en_US/en_US/' /mnt/etc/locale.gen ansible.builtin.command: sed -i 's/^#en_US/en_US/' /mnt/etc/locale.gen
- name: archinstall | install os | generate locales - name: archinstall | install os | generate locales
command: arch-chroot /mnt locale-gen ansible.builtin.command: arch-chroot /mnt locale-gen
- name: archinstall | install os | generate template for arch-chroot installation - name: archinstall | install os | generate template for arch-chroot installation
template: ansible.builtin.template:
src: arch_chroot_install.sh src: arch_chroot_install.sh
dest: /mnt/arch_chroot_install.sh dest: /mnt/arch_chroot_install.sh
mode: "0755" mode: "0755"
- name: archinstall | install os | set hostname - name: archinstall | install os | set hostname
copy: ansible.builtin.copy:
dest: /mnt/etc/hostname dest: /mnt/etc/hostname
content: | content: |
{{ inventory_hostname }} {{ inventory_hostname }}
- name: archinstall | install os | run installation script in arch-chroot - name: archinstall | install os | run installation script in arch-chroot
command: arch-chroot /mnt /arch_chroot_install.sh ansible.builtin.command: arch-chroot /mnt /arch_chroot_install.sh
register: chroot register: chroot
- name: archinstall | install os | arch-chroot install output - name: archinstall | install os | arch-chroot install output
debug: ansible.builtin.debug:
msg: "{{ chroot.stdout_lines }}" msg: "{{ chroot.stdout_lines }}"
- name: archinstall | install os | remove arch-chroot installation script - name: archinstall | install os | remove arch-chroot installation script
file: ansible.builtin.file:
path: /mnt/arch_chroot_install.sh path: /mnt/arch_chroot_install.sh
state: absent state: absent

View file

@ -1,4 +1,4 @@
--- ---
- name: Select fastest Arch repository mirrors - name: Select fastest Arch repository mirrors
command: ansible.builtin.command:
cmd: reflector --country US --latest 5 --sort rate --save /etc/pacman.d/mirrorlist cmd: reflector --country US --latest 5 --sort rate --save /etc/pacman.d/mirrorlist

View file

@ -6,8 +6,8 @@
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 - name: partition | Ensure efi is not mounted
mount: ansible.posix.mount:
path: /mnt/boot/efi path: /mnt/boot/efi
state: unmounted state: unmounted
@ -15,20 +15,21 @@
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 }}"
- debug: var=base_root_usable_mib - ansible.builtin.debug:
var: base_root_usable_mib
- name: Calculate disk utilization percentage - name: Calculate disk utilization percentage
ansible.builtin.set_fact: ansible.builtin.set_fact:
base_root_usable_mib: "{{ base_root_usable_mib|int - ((base_root_usable_mib|float) * (0.01 * (base_root_free_percent|float))) | round(method='floor') | int }}" base_root_usable_mib: "{{ base_root_usable_mib | int - ((base_root_usable_mib | float) * (0.01 * (base_root_free_percent | float))) | round(method='floor') |
int }}"
- name: Calculate zfs volume size - name: Calculate zfs volume size
set_fact: ansible.builtin.set_fact:
base_root_zpool_mib: "{{ base_root_usable_mib | int - fixed_size_partitions | int }}" base_root_zpool_mib: "{{ base_root_usable_mib | int - fixed_size_partitions | int }}"
vars: vars:
fixed_size_partitions: "{{ base_root_swap_mib | int + base_root_efi_mib | int }}" fixed_size_partitions: "{{ base_root_swap_mib | int + base_root_efi_mib | int }}"
# #
- name: Calculate partition layouts - name: Calculate partition layouts
set_fact: ansible.builtin.set_fact:
partition_ranges: >- partition_ranges: >-
{{ {{
(partition_ranges|d([])) + [{ (partition_ranges|d([])) + [{
@ -47,11 +48,11 @@
- name: swap - name: swap
size_mib: "{{ base_root_swap_mib }}" size_mib: "{{ base_root_swap_mib }}"
- debug: - ansible.builtin.debug:
var: partition_ranges var: partition_ranges
- name: Initialize partition facts - name: Initialize partition facts
set_fact: ansible.builtin.set_fact:
base_efi_partitions: [] base_efi_partitions: []
base_root_partitions: [] base_root_partitions: []
base_swap_partitions: [] base_swap_partitions: []
@ -61,7 +62,7 @@
become: true become: true
vars: vars:
part_index: 0 part_index: 0
parted: community.general.parted:
label: gpt label: gpt
unit: MiB unit: MiB
name: EFI Boot name: EFI Boot
@ -76,12 +77,12 @@
register: parted_create register: parted_create
- name: Collect EFI partition devices - name: Collect EFI partition devices
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort" ansible.builtin.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') }}"
- name: Store EFI partition devices - name: Store EFI partition devices
set_fact: ansible.builtin.set_fact:
base_efi_partitions: >- base_efi_partitions: >-
{{ base_efi_partitions|d([]) + [ {{ base_efi_partitions|d([]) + [
item[part_index+1] item[part_index+1]
@ -91,14 +92,13 @@
vars: vars:
part_index: 0 part_index: 0
- debug: var=base_efi_partitions - ansible.builtin.debug:
var: base_efi_partitions
#### zroot
- name: Create root zvol partition - name: Create root zvol partition
become: true become: true
vars: vars:
part_index: 1 part_index: 1
parted: community.general.parted:
label: gpt label: gpt
unit: MiB unit: MiB
name: ArchLinux ZFS Root name: ArchLinux ZFS Root
@ -111,12 +111,12 @@
register: parted_create register: parted_create
- name: Collect root zvol partition devices - name: Collect root zvol partition devices
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort" ansible.builtin.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') }}"
- name: Store root zvol partition devices - name: Store root zvol partition devices
set_fact: ansible.builtin.set_fact:
base_root_partitions: >- base_root_partitions: >-
{{ base_root_partitions|d([]) + [ {{ base_root_partitions|d([]) + [
item[part_index+1] item[part_index+1]
@ -131,7 +131,7 @@
become: true become: true
vars: vars:
part_index: 2 part_index: 2
parted: community.general.parted:
label: gpt label: gpt
unit: MiB unit: MiB
device: "{{ item.disk.dev }}" device: "{{ item.disk.dev }}"
@ -145,13 +145,13 @@
when: base_root_swap_mib is defined and base_root_swap_mib|int > 0 when: base_root_swap_mib is defined and base_root_swap_mib|int > 0
- name: Collect swap partition devices - name: Collect swap partition devices
shell: "lsblk -r --noheadings -o PATH {{ item }} | sort" ansible.builtin.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 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: ansible.builtin.set_fact:
base_swap_partitions: >- base_swap_partitions: >-
{{ base_swap_partitions|d([]) + [ {{ base_swap_partitions|d([]) + [
item[part_index+1] item[part_index+1]
@ -163,18 +163,18 @@
when: base_root_swap_mib is defined and base_root_swap_mib|int > 0 when: base_root_swap_mib is defined and base_root_swap_mib|int > 0
- name: Analyze resulting partition layouts - name: Analyze resulting partition layouts
parted: community.general.parted:
unit: MiB unit: MiB
device: "{{ item }}" device: "{{ item }}"
register: base_root_disks_info register: base_root_disks_info
loop: "{{ base_root_disks | list }}" loop: "{{ base_root_disks | list }}"
- name: Collect disk device identifiers - name: Collect disk device identifiers
shell: "for x in /dev/disk/by-id/*; do echo $x $(realpath $x); done" ansible.builtin.shell: "for x in /dev/disk/by-id/*; do echo $x $(realpath $x); done"
register: disk_realpaths register: disk_realpaths
- name: Collect disk device identifiers into a base_partitions_by_id dictionary - name: Collect disk device identifiers into a base_partitions_by_id dictionary
set_fact: ansible.builtin.set_fact:
base_partitions_by_id: >- base_partitions_by_id: >-
{{ {{
dict( dict(
@ -184,6 +184,9 @@
) )
}} }}
- debug: var=base_efi_partitions - ansible.builtin.debug:
- debug: var=base_root_partitions var: base_efi_partitions
- debug: var=base_swap_partitions - ansible.builtin.debug:
var: base_root_partitions
- ansible.builtin.debug:
var: base_swap_partitions

View file

@ -1,10 +1,11 @@
- name: archinstall | re-create post-installation snapshot of zroot/ROOT/arch ---
- name: archinstall | Re-create post-installation snapshot of zroot/ROOT/arch
community.general.zfs: community.general.zfs:
name: zroot/ROOT/arch@post-installation name: zroot/ROOT/arch@post-installation
state: "{{ item }}" state: "{{ item }}"
with_items: [absent, present] with_items: [absent, present]
- name: archinstall | re-create post-installation snapshot of zroot/DATA/home - name: archinstall | Re-create post-installation snapshot of zroot/DATA/home
community.general.zfs: community.general.zfs:
name: zroot/DATA/home@post-installation name: zroot/DATA/home@post-installation
state: "{{ item }}" state: "{{ item }}"

View file

@ -1,10 +1,8 @@
--- ---
- name: Mount arch zroot - name: Mount arch zroot
command: zfs mount zroot/ROOT/arch ansible.builtin.command: zfs mount zroot/ROOT/arch
- name: Mount all other zroot mountpoints - name: Mount all other zroot mountpoints
command: zfs mount -a ansible.builtin.command: zfs mount -a
- name: Create zroot destination directories - name: Create zroot destination directories
ansible.builtin.file: ansible.builtin.file:
path: "/mnt{{ item }}" path: "/mnt{{ item }}"
@ -13,8 +11,8 @@
- /etc/zfs - /etc/zfs
- /boot/efi - /boot/efi
- debug: var=base_efi_partitions - ansible.builtin.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
@ -22,11 +20,9 @@
fstype: vfat fstype: vfat
state: mounted state: mounted
- name: zfs | set zroot bootfs to arch - name: zfs | Set zroot bootfs to arch
command: zpool set bootfs=zroot/ROOT/arch zroot ansible.builtin.command: zpool set bootfs=zroot/ROOT/arch zroot
- name: zfs | Set cachefile
- name: zfs | set cachefile ansible.builtin.command: zpool set cachefile=/etc/zfs/zpool.cache zroot
command: zpool set cachefile=/etc/zfs/zpool.cache zroot - name: zfs | Copy cache file to chroot
ansible.builtin.command: cp /etc/zfs/zpool.cache /mnt/etc/zfs
- name: zfs | copy cache file to chroot
command: cp /etc/zfs/zpool.cache /mnt/etc/zfs

View file

@ -1,15 +1,15 @@
--- ---
- block: - when: archiso_detected and base_root_disks is defined
- name: ensure root_password is set block:
assert: - name: Ensure root_password is set
ansible.builtin.assert:
that: root_password is defined that: root_password is defined
msg: "please specify a root password via -e root_password=<password>" msg: "please specify a root password via -e root_password=<password>"
- import_tasks: archinstall/mirrorlist.yaml - ansible.builtin.import_tasks: archinstall/mirrorlist.yaml
- import_tasks: archinstall/partition.yaml - ansible.builtin.import_tasks: archinstall/partition.yaml
- import_tasks: archinstall/initialize_root_zvol.yaml - ansible.builtin.import_tasks: archinstall/initialize_root_zvol.yaml
- import_tasks: archinstall/initialize_swap.yaml - ansible.builtin.import_tasks: archinstall/initialize_swap.yaml
- import_tasks: archinstall/initialize_efi.yaml - ansible.builtin.import_tasks: archinstall/initialize_efi.yaml
- import_tasks: archinstall/prepare_chroot.yaml - ansible.builtin.import_tasks: archinstall/prepare_chroot.yaml
- import_tasks: archinstall/install_os.yaml - ansible.builtin.import_tasks: archinstall/install_os.yaml
- import_tasks: archinstall/postinstall_snapshot.yaml - ansible.builtin.import_tasks: archinstall/postinstall_snapshot.yaml
when: archiso_detected and base_root_disks is defined

View file

@ -1,9 +1,9 @@
--- ---
- name: check for archinstall in path - name: Check for archinstall in path
command: which archinstall ansible.builtin.command: which archinstall
ignore_errors: true ignore_errors: true
register: which_archinstall register: which_archinstall
- name: inspect archinstall check result - name: Inspect archinstall check result
set_fact: ansible.builtin.set_fact:
archiso_detected: "{{ which_archinstall.rc == 0 }}" archiso_detected: "{{ which_archinstall.rc == 0 }}"

View file

@ -1,13 +1,13 @@
--- ---
- name: dotfiles | set user shell - name: dotfiles | Set user shell
ansible.builtin.user: ansible.builtin.user:
name: "{{ dotfiles_user }}" name: "{{ dotfiles_user }}"
shell: "/usr/bin/{{ dotfiles_shell }}" shell: "/usr/bin/{{ dotfiles_shell }}"
- name: dotfiles | install from remote source - name: dotfiles | Install from remote source
become: true become: true
become_user: "{{ dotfiles_user }}" become_user: "{{ dotfiles_user }}"
shell: ansible.builtin.shell:
cmd: "curl -o- -L {{ dotfiles_url }} | {{ dotfiles_shell }}" cmd: "curl -o- -L {{ dotfiles_url }} | {{ dotfiles_shell }}"
creates: "/home/{{ dotfiles_user }}/.dotfiles" creates: "/home/{{ dotfiles_user }}/.dotfiles"
register: dotfiles register: dotfiles

View file

@ -1 +1,2 @@
---
desktop_user: mark desktop_user: mark

View file

@ -1,12 +1,12 @@
--- ---
- block: - when: not archiso_detected
- name: pacman sync block:
- name: Pacman sync
community.general.pacman: community.general.pacman:
update_cache: true update_cache: true
- import_tasks: software/minimal.yaml - ansible.builtin.import_tasks: software/minimal.yaml
- import_tasks: software/desktop.yaml - ansible.builtin.import_tasks: software/desktop.yaml
- import_tasks: software/graphics.yaml - ansible.builtin.import_tasks: software/graphics.yaml
- import_tasks: software/dev.yaml - ansible.builtin.import_tasks: software/dev.yaml
- import_tasks: software/gamedev.yaml - ansible.builtin.import_tasks: software/gamedev.yaml
when: not archiso_detected

View file

@ -1,5 +1,6 @@
- name: install desktop packages ---
package: - name: Install desktop packages
ansible.builtin.package:
state: present state: present
name: name:
- adwaita-cursors - adwaita-cursors
@ -36,10 +37,10 @@
- xdg-user-dirs - xdg-user-dirs
- xorg-xwayland - xorg-xwayland
- name: install AUR packages - name: Install AUR packages
become: true become: true
become_user: "{{ desktop_user }}" become_user: "{{ desktop_user }}"
shell: >- ansible.builtin.command: >-
paru -Sy --needed --noconfirm {{ packages | join(' ') }} paru -Sy --needed --noconfirm {{ packages | join(' ') }}
vars: vars:
packages: packages:
@ -47,17 +48,15 @@
- ttf-envy-code-r - ttf-envy-code-r
- winbox - winbox
- name: loginctl | enable linger for desktop user - name: loginctl | Enable linger for desktop user
command: "loginctl enable-linger {{ desktop_user }}" ansible.builtin.command: "loginctl enable-linger {{ desktop_user }}"
- name: syncthing | Generate default config
- name: syncthing | generate default config become: true
become: yes
become_user: "{{ desktop_user }}" become_user: "{{ desktop_user }}"
command: >- ansible.builtin.command: >-
syncthing generate --no-default-folder --skip-port-probing syncthing generate --no-default-folder --skip-port-probing
- name: syncthing | Enable user systemd unit
- name: syncthing | enable user systemd unit ansible.builtin.systemd:
systemd:
name: syncthing.service name: syncthing.service
enabled: true enabled: true
state: started state: started
@ -68,36 +67,35 @@
- name: greetd | configure | use tuigreet - name: greetd | configure | use tuigreet
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: /etc/greetd/config.toml path: /etc/greetd/config.toml
regexp: '^command =' regexp: "^command ="
line: command = "tuigreet --cmd sway" line: command = "tuigreet --cmd sway"
- name: greetd | enable systemd unit - name: greetd | Enable systemd unit
systemd: ansible.builtin.systemd:
name: greetd name: greetd
enabled: true enabled: true
- name: bluetooth | enable systemd unit - name: bluetooth | Enable systemd unit
systemd: ansible.builtin.systemd:
name: bluetooth name: bluetooth
enabled: true enabled: true
- name: wal | set initial colorscheme - name: wal | Set initial colorscheme
become: true become: true
become_user: "{{ desktop_user }}" become_user: "{{ desktop_user }}"
shell: wal --theme hybrid-material ansible.builtin.command: wal --theme hybrid-material
- name: sway | Reload if running
- name: sway | reload if running
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 ansible.builtin.shell: pidof sway && SWAYSOCK=$(ls /run/user/*/sway-ipc.*.sock | head -n 1) swaymsg reload
ignore_errors: true ignore_errors: true
- name: graphics | probe for graphics cards - name: graphics | Probe for graphics cards
shell: lspci -nnk | grep -A 3 -E "VGA|3D" ansible.builtin.shell: lspci -nnk | grep -A 3 -E "VGA|3D"
register: lspci register: lspci
- name: graphics | install radeon specific packages - name: graphics | Install radeon specific packages
package: ansible.builtin.package:
state: present state: present
name: name:
- hip-runtime-amd - hip-runtime-amd

View file

@ -1,5 +1,6 @@
- name: install gamedev packages ---
package: - name: Install gamedev packages
ansible.builtin.package:
state: present state: present
name: name:
- neovim - neovim

View file

@ -1,5 +1,6 @@
- name: install gamedev packages ---
package: - name: Install gamedev packages
ansible.builtin.package:
state: present state: present
name: name:
- godot - godot

View file

@ -1,5 +1,6 @@
- name: install graphics packages ---
package: - name: Install graphics packages
ansible.builtin.package:
state: present state: present
name: name:
- blender - blender

View file

@ -1,10 +1,11 @@
- name: install minimal packages ---
package: - name: Install minimal packages
ansible.builtin.package:
state: present state: present
name: name:
- eza - eza
- fzf - fzf
- htop - htop
- ripgrep - ripgrep
- zip - unzip
- zsh - zsh