added snapper conf
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
- pipewire-audio
|
- pipewire-audio
|
||||||
- pipewire-pulse
|
- pipewire-pulse
|
||||||
- thunderbird
|
- thunderbird
|
||||||
|
- snapper
|
||||||
- name: Enable networkmanager
|
- name: Enable networkmanager
|
||||||
service:
|
service:
|
||||||
name: NetworkManager
|
name: NetworkManager
|
||||||
@@ -94,6 +95,49 @@
|
|||||||
flatpak_remote:
|
flatpak_remote:
|
||||||
name: flathub
|
name: flathub
|
||||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
- name: setup snapper config for root filesystem
|
||||||
|
command:
|
||||||
|
cmd: snapper -c root create-config /
|
||||||
|
creates: /etc/snapper/configs/root
|
||||||
|
- name: setup snapper config for home filesystem
|
||||||
|
command:
|
||||||
|
cmd: snapper -c home create-config /home
|
||||||
|
creates: /etc/snapper/configs/home
|
||||||
|
- name: disable timed root snapshots
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/snapper/configs/root
|
||||||
|
regexp: "TIMELINE_CREATE"
|
||||||
|
line: 'TIMELINE_CREATE="no"'
|
||||||
|
notify: restart snapper
|
||||||
|
- name: set root snapshot max numbers
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/snapper/configs/root
|
||||||
|
regexp: "NUMBER_LIMIT"
|
||||||
|
line: 'NUMBER_LIMIT="8"'
|
||||||
|
notify: restart snapper
|
||||||
|
- name: set user permissions for home snapshots
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/snapper/configs/home
|
||||||
|
regexp: "ALLOW_USERS"
|
||||||
|
line: 'ALLOW_USERS="vi"'
|
||||||
|
notify: restart snapper
|
||||||
|
- name: Set home snapshots timeline retention
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/snapper/configs/home
|
||||||
|
regexp: "{{ item.param }}"
|
||||||
|
line: "{{ item.param }}=\"{{ item.value }}\""
|
||||||
|
notify: restart snapper
|
||||||
|
with_items:
|
||||||
|
- param: 'TIMELINE_LIMIT_HOURLY'
|
||||||
|
value: "8"
|
||||||
|
- param: 'TIMELINE_LIMIT_DAILY'
|
||||||
|
value: "5"
|
||||||
|
- param: 'TIMELINE_LIMIT_WEEKLY'
|
||||||
|
value: "2"
|
||||||
|
- param: 'TIMELINE_LIMIT_MONTHLY'
|
||||||
|
value: "1"
|
||||||
|
- param: 'TIMELINE_LIMIT_YEARLY'
|
||||||
|
value: "0"
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: update initramfs
|
- name: update initramfs
|
||||||
@@ -102,3 +146,7 @@
|
|||||||
- name: update grub
|
- name: update grub
|
||||||
command:
|
command:
|
||||||
cmd: update-grub
|
cmd: update-grub
|
||||||
|
- name: restart snapper
|
||||||
|
service:
|
||||||
|
name: snapperd
|
||||||
|
state: restarted
|
||||||
|
|||||||
Reference in New Issue
Block a user