aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/general.yml
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-05-13 00:13:57 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-05-16 18:42:27 +0300
commitb5860daf11ac353049cb1654b9414a129e5cfb96 (patch)
tree87ed89711e4f0e85ace0a97fa123199152c67302 /tasks/general.yml
parent4715a28fdcd87440400d17154bfa361d99db29cc (diff)
Rework
Diffstat (limited to 'tasks/general.yml')
-rw-r--r--tasks/general.yml167
1 files changed, 0 insertions, 167 deletions
diff --git a/tasks/general.yml b/tasks/general.yml
deleted file mode 100644
index 0ec9219..0000000
--- a/tasks/general.yml
+++ /dev/null
@@ -1,167 +0,0 @@
-- name: Install packages
- package:
- name: "{{ item }}"
- state: present
- loop:
- - rsync
- - dma
- - jq
- - curl
- - bash
- - python
- - py311-pip
- - fastfetch
-
-- name: Install amd64-specific packages
- package:
- name: "{{ item }}"
- state: present
- loop:
- - vm-bhyve
- - drm-kmod
- when: not is_test_vm
-
-- name: Set up periodic.conf
- template:
- src: etc_periodic.conf.j2
- dest: /etc/periodic.conf
- owner: root
- group: wheel
- mode: "0644"
-
-- name: Set up /etc/rc.conf
- template:
- src: etc_rc.conf.j2
- dest: /etc/rc.conf
- owner: root
- group: wheel
- mode: "0644"
- register: rc_conf
-
-- name: Set up fstab
- template:
- src: etc_fstab.j2
- dest: /etc/fstab
- owner: root
- group: wheel
- mode: "0644"
- register: fstab
- when: not is_test_vm
-
-- name: Run mount -a
- shell: mount -a
- when: not is_test_vm and fstab.changed
-
-- name: Start auditd
- service:
- name: auditd
- state: started
-
-- name: Check if pylogsentinel is installed
- shell: pip show pylogsentinel
- register: pylogsentinel_check
- failed_when: false
- changed_when: false
-
-- name: Install pylogsentinel
- shell: pip install pylogsentinel==0.3.0 --force --no-input
- when: pylogsentinel_check.rc != 0
-
-- name: Install pylogsentinel.conf
- template:
- src: usr_local_etc_pylogsentinel.conf.j2
- dest: /usr/local/etc/pylogsentinel.conf
- owner: root
- group: wheel
- mode: "0644"
-
-- name: Install pylogsentinel-batch-email.sh
- template:
- src: usr_local_bin_pylogsentinel-batch-email.sh.j2
- dest: /usr/local/bin/pylogsentinel-batch-email.sh
- owner: root
- group: wheel
- mode: "0755"
-
-- name: Set up crontab
- template:
- src: etc_crontab.j2
- dest: /etc/crontab
- owner: root
- group: wheel
- mode: "0644"
- register: etc_crontab
-
-- name: Restart cron
- service:
- name: cron
- state: restarted
- when: etc_crontab.changed
-
-- name: Install logto
- template:
- src: usr_local_bin_logto.sh.j2
- dest: /usr/local/bin/logto
- owner: root
- group: wheel
- mode: "0755"
-
-- name: Copy backup SSH private key
- copy:
- src: "{{ backup_ssh_privkey_file }}"
- dest: /root/.ssh/backup
- owner: root
- group: wheel
- mode: "0600"
- when: not is_test_vm
-
-- name: Copy backup SSH public key
- copy:
- src: "{{ backup_ssh_pubkey_file }}"
- dest: /root/.ssh/backup.pub
- owner: root
- group: wheel
- mode: "0644"
- when: not is_test_vm
-
-- name: Copy SSH config
- template:
- src: root_ssh_config.j2
- dest: /root/.ssh/config
- owner: root
- group: wheel
- mode: "0644"
- when: not is_test_vm
-
-- name: Copy backup script
- template:
- src: usr_local_bin_backup.sh.j2
- dest: /usr/local/bin/backup
- owner: root
- group: wheel
- mode: "0755"
- when: not is_test_vm
-
-- name: Check if zroot/vm exists
- shell: zfs list zroot/vm
- register: zroot_vm_check
- failed_when: false
- changed_when: false
- when: not is_test_vm
-
-- name: Add vm dataset for bhyve and init
- when: not is_test_vm and zroot_vm_check.rc != 0
- block:
- - name: Create vm dataset
- shell: zfs create zroot/vm
-
- - name: Run vm init
- shell: vm init
-
-- name: Install .bashrc
- copy:
- src: templates/root_bashrc
- dest: /root/.bashrc
- owner: root
- group: wheel
- mode: "0644"