add laptop setup #268

Merged
mg merged 44 commits from laptop_mint into master 2024-12-30 20:06:25 +01:00
Showing only changes of commit 281a025962 - Show all commits

View file

@ -1,15 +1,20 @@
---
- name: template unit-template
- name: Ensure systemd services are templated
become: true
ansible.builtin.template:
src: zpool-scrub@.service.j2
dest: /etc/systemd/system/zpool-scrub@.service
src: "{{ item }}.j2"
dest: /etc/systemd/system/{{ item }}
owner: root
group: root
mode: "0644"
register: template_unit
notify:
- systemctl daemon-reload
- systemctl enable units
loop:
- zpool-scrub@.service
- zpool-scrub-mail.service
- name: template timer
- name: Ensure systemd timers are templated
become: true
ansible.builtin.template:
src: zpool-scrub@.timer.j2
@ -20,24 +25,6 @@
loop: "{{ zfs_extra_zfs_pools }}"
register: template_timer
- name: template mail.service
become: true
ansible.builtin.template:
src: zpool-scrub-mail.service.j2
dest: "/etc/systemd/system/zpool-scrub-mail.service"
owner: root
group: root
mode: "0644"
register: template_mail
- name: systemctl daemon-reload
become: true
ansible.builtin.systemd:
daemon_reload: true
when:
- template_unit.changed
- template_timer.changed
- name: systemctl enable units - timer
become: true
ansible.builtin.systemd:
@ -45,9 +32,6 @@
enabled: true
masked: false
loop: "{{ zfs_extra_zfs_pools }}"
when:
- template_unit.changed
- template_timer.changed
- name: systemctl enable units - mail
become: true
@ -65,9 +49,6 @@
state: restarted
enabled: true
loop: "{{ zfs_extra_zfs_pools }}"
when:
- template_unit.changed
- template_timer.changed
- name: remove old cronjobs
become: true