63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
---
|
|
- name: Setup the system
|
|
hosts: all
|
|
gather_facts: true
|
|
pre_tasks:
|
|
- name: Sanity checks
|
|
tags: always
|
|
block:
|
|
- name: Check user ID
|
|
fail:
|
|
msg: This playbook should be run as 'root'
|
|
when: ansible_real_user_id != 0
|
|
- name: Import list of accepted values for custom variables
|
|
include_vars:
|
|
name: accepted_values
|
|
file: ./requirements/accepted_variables.yml
|
|
- name: Check defined values of top-level variables
|
|
fail:
|
|
msg: 'Variable `{{ item }}` needs to be 1 of {{ accepted_values[item] }}'
|
|
when: not vars[item] in accepted_values[item]
|
|
loop: '{{ accepted_values | flatten }}'
|
|
- name: Get ZFS pool facts
|
|
community.general.zpool_facts:
|
|
tags: always
|
|
roles:
|
|
- role: essential
|
|
tags: essential
|
|
- role: devd
|
|
tags: devd
|
|
- role: acpi
|
|
tags: acpi
|
|
- role: seat
|
|
tags: seat
|
|
- role: fstab
|
|
tags: fstab
|
|
- role: nftables
|
|
tags: nftables
|
|
- role: apparmor
|
|
tags: apparmor
|
|
- role: auditd
|
|
tags: auditd
|
|
- role: ntpd
|
|
tags: ntpd
|
|
- role: cron
|
|
tags: cron
|
|
- role: networking
|
|
tags: networking
|
|
- role: libvirt
|
|
tags: libvirt
|
|
- role: tlp
|
|
tags: [laptop, tlp]
|
|
- role: dns
|
|
tags: dns
|
|
- role: usbguard
|
|
tags: usbguard
|
|
- role: zram
|
|
tags: zram
|
|
- role: snapshot
|
|
tags: snapshot
|
|
- role: earlyoom
|
|
tags: earlyoom
|
|
- role: user
|
|
tags: user
|