Update customized live image weekly.

This commit is contained in:
Andreas B. Mundt 2022-07-07 19:45:47 +02:00 committed by Andreas B. Mundt
parent adaa730c07
commit 62931a927f
4 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,6 @@
[Unit]
Description=Run livebuilder script
[Service]
Type=simple
ExecStart=/usr/local/sbin/livebuilder.sh

View file

@ -0,0 +1,11 @@
[Unit]
Description=Run livebuilder script weekly
[Timer]
OnCalendar=weekly
Persistent=true
AccuracySec=3h
RandomizedDelaySec=3h
[Install]
WantedBy=timers.target

View file

@ -3,3 +3,10 @@
command:
cmd: livebuilder.sh
listen: run build script
- name: enable timer for livebuilder
systemd:
name: livebuilder.timer
state: started
enabled: true
listen: enable livebuilder.timer

View file

@ -17,6 +17,16 @@
dest: /usr/local/sbin/
mode: 0755
- name: provide service and timer for livebuilder
copy:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
mode: 0644
with_items:
- livebuilder.service
- livebuilder.timer
notify: "enable livebuilder.timer"
- name: copy live-build configuration
copy:
src: "{{ item }}"