feat: Install 50ohm webserver, download the content and install the final, static website
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
git -C 50ohm pull
|
||||
git -C 50ohm-contents-dl pull
|
||||
cd 50ohm
|
||||
uv run python3 ./build.py
|
||||
@@ -0,0 +1,30 @@
|
||||
- name: Install refresh-50ohm.sh in {{ destination_path }}/refresh-50ohm.sh
|
||||
ansible.builtin.copy:
|
||||
src: files/refresh-50ohm.sh
|
||||
dest: "{{ destination_path }}/refresh-50ohm.sh"
|
||||
owner: "{{ fiftyohm_user }}"
|
||||
group: "{{ fiftyohm_group }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Install systemd timer unit for 50ohm refresh in /etc/systemd/system/refresh-50ohm.timer
|
||||
ansible.builtin.template:
|
||||
src: templates/timer.j2
|
||||
dest: /etc/systemd/system/refresh-50ohm.timer
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Install systemd service unit for 50ohm refresh in /etc/systemd/system/refresh-50ohm.service
|
||||
ansible.builtin.template:
|
||||
src: templates/service.j2
|
||||
dest: /etc/systemd/system/refresh-50ohm.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Enable and start refresh-50ohm.timer
|
||||
ansible.builtin.systemd:
|
||||
name: refresh-50ohm.timer
|
||||
enabled: true
|
||||
state: started
|
||||
daemon_reload: true
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Refresh 50ohm.de with a timer
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart={{ destination_path }}/refresh-50ohm.sh
|
||||
User={{ fiftyohm_user }}
|
||||
WorkingDirectory={{ destination_path }}/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Timer for refreshing 50ohm.de
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitAciveSec=15min
|
||||
Unit=refresh-50ohm.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user