1
0
Fork 0
forked from rc/classroom

Add live btrfs snapshot updating role

This commit is contained in:
Gašper Fele-Žorž 2025-10-16 12:40:52 +02:00
parent 60ad70a09f
commit 9ca982641a
7 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[Unit]
Description=Update btrfs filesystems
[Service]
User=root
Group=root
Type=oneshot
ExecStart=/home/partimag/fri_live_upgrade/frib_update.py

View file

@ -0,0 +1,12 @@
[Unit]
Description=Frib Autoupdate Timer
[Timer]
OnBootSec=5m
OnUnitActiveSec=30m
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=rsync D:
[Service]
User=root
Group=root
Type=oneshot
ExecStart=/bin/bash /mnt/ucilnice_d/skupno/porini_na_d.sh

View file

@ -0,0 +1,12 @@
[Unit]
Description=Rsync D: timer
[Timer]
OnBootSec=5m
OnUnitActiveSec=30m
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,4 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -0,0 +1,39 @@
- name: Create frib_autoupdate systemd unit
ansible.builtin.copy:
src: frib_autoupdate.service
dest: /etc/systemd/system/
owner: root
group: root
- name: Create frib_autoupdate timer
ansible.builtin.copy:
src: frib_autoupdate.timer
dest: /etc/systemd/system/
owner: root
group: root
- name: Enable frib_autoupdate timer
ansible.builtin.systemd_service:
name: frib_autoupdate.timer
state: started
enabled: true
- name: Create rsync_ucilnicesmb_d systemd unit
ansible.builtin.copy:
src: rsync_ucilnicesmb_d.service
dest: /etc/systemd/system/
owner: root
group: root
- name: Create rsync_ucilnicesmb_d timer
ansible.builtin.copy:
src: rsync_ucilnicesmb_d.timer
dest: /etc/systemd/system/
owner: root
group: root
- name: Enable rsync_ucilnicesmb_d timer
ansible.builtin.systemd_service:
name: rsync_ucilnicesmb_d.timer
state: started
enabled: true

View file

@ -0,0 +1 @@