diff options
| author | Joe Carstairs <me@joeac.net> | 2026-09-30 17:12:13 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-09-30 17:12:13 +0100 |
| commit | f671eda1a8c89910647b745de61cb07976dc1b4b (patch) | |
| tree | ddc19ccdf442f67cf0813298407f0d0f826b0f87 /roles | |
| parent | 54bbd2e9d716a18542431e04c3f829a39146dfce (diff) | |
scag update (now jamdog)
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/jamdog/tasks/main.yml (renamed from roles/scag/tasks/main.yml) | 74 | ||||
| -rw-r--r-- | roles/jamdog/templates/header.html | 10 | ||||
| -rw-r--r-- | roles/jamdog/templates/jamdog.toml (renamed from roles/scag/templates/scag.toml) | 0 | ||||
| -rw-r--r-- | roles/jamdog/templates/nginx/feed.conf (renamed from roles/scag/templates/nginx/feed.conf) | 0 | ||||
| -rw-r--r-- | roles/scag/templates/header.html | 30 |
5 files changed, 46 insertions, 68 deletions
diff --git a/roles/scag/tasks/main.yml b/roles/jamdog/tasks/main.yml index ca26c3e..81626e0 100644 --- a/roles/scag/tasks/main.yml +++ b/roles/jamdog/tasks/main.yml @@ -1,28 +1,28 @@ -- name: Install scag by pre-compiling the binary - when: ( not ( scag_install_method is defined ) ) or scag_install_method == "precompile" +- name: Install jamdog by pre-compiling the binary + when: ( not ( jamdog_install_method is defined ) ) or jamdog_install_method == "precompile" block: - - name: Fetch scag source code + - name: Fetch jamdog source code delegate_to: 127.0.0.1 become: false ansible.builtin.git: - repo: https://git.joeac.net/scag.git - dest: /tmp/scag + repo: https://git.joeac.net/jamdog.git + dest: /tmp/jamdog depth: 1 - - name: Cross-compile scag + - name: Cross-compile jamdog delegate_to: 127.0.0.1 become: false ansible.builtin.shell: cmd: cross build --release --target {{ rust_target }} - chdir: /tmp/scag + chdir: /tmp/jamdog changed_when: "'Compiling' in _task.result.stderr" - - name: Install scag binary + - name: Install jamdog binary ansible.builtin.copy: - src: /tmp/scag/target/{{ rust_target }}/release/scag - dest: /usr/bin/scag + src: /tmp/jamdog/target/{{ rust_target }}/release/jamdog + dest: /usr/bin/jamdog mode: +x -- name: Install or update scag using rustup - when: scag_install_method == "rustup" +- name: Install or update jamdog using rustup + when: jamdog_install_method == "rustup" block: - name: Install Rust toolchain using installation script ansible.builtin.shell: @@ -31,41 +31,41 @@ - name: Update Rust toolchain with rustup ansible.builtin.shell: rustup update changed_when: "'updated' in _task.result.stdout" - - name: Install or update scag using cargo + - name: Install or update jamdog using cargo ansible.builtin.shell: - cmd: cargo install --git git://git.joeac.net/scag.git + cmd: cargo install --git git://git.joeac.net/jamdog.git changed_when: "'Installed' in _task.result.stdout or 'Replaced' in _task.result.stdout" - - name: Install daily crontab to update scag using cargo + - name: Install daily crontab to update jamdog using cargo ansible.builtin.cron: special_time: daily - name: Update scag - job: cargo install --git git://git.joeac.net/scag.git + name: Update jamdog + job: cargo install --git git://git.joeac.net/jamdog.git -- name: Install scag using cargo provided by APK - when: scag_install_method == "cargo" +- name: Install jamdog using cargo provided by APK + when: jamdog_install_method == "cargo" block: - name: Install cargo using APK community.general.apk: name: cargo - - name: Install or update scag using cargo + - name: Install or update jamdog using cargo ansible.builtin.shell: - cmd: cargo install --git git://git.joeac.net/scag.git + cmd: cargo install --git git://git.joeac.net/jamdog.git changed_when: "'Installed' in _task.result.stdout or 'Replaced' in _task.result.stdout" - - name: Install daily crontab to update scag using cargo + - name: Install daily crontab to update jamdog using cargo ansible.builtin.cron: special_time: daily - name: Update scag - job: cargo install --git git://git.joeac.net/scag.git + name: Update jamdog + job: cargo install --git git://git.joeac.net/jamdog.git -- name: Create scag configuration directory +- name: Create jamdog configuration directory ansible.builtin.file: - path: /etc/scag + path: /etc/jamdog state: directory -- name: Configure scag +- name: Configure jamdog ansible.builtin.template: - src: scag.toml - dest: /etc/scag/config.toml + src: jamdog.toml + dest: /etc/jamdog/config.toml - name: Configure HTML feed head ansible.builtin.shell: @@ -86,10 +86,10 @@ dest: "{{ src_dir }}/subscriptions" depth: 1 -- name: Symlink subscriptions into scag configuration directory +- name: Symlink subscriptions into jamdog configuration directory ansible.builtin.file: src: "{{ src_dir }}/subscriptions/subscriptions.txt" - dest: /etc/scag/subscriptions.txt + dest: /etc/jamdog/subscriptions.txt state: link - name: Create directory for RSS file @@ -99,9 +99,9 @@ owner: nginx group: nginx -- name: Use scag to generate RSS file +- name: Use jamdog to generate RSS file ansible.builtin.shell: - cmd: scag + cmd: jamdog creates: "{{ http_files_dir }}/feed/{{ feed_rss_path }}" - name: Install nginx location config @@ -116,10 +116,8 @@ name: nginx state: restarted -- name: Install hourly crontab to update subscriptions and run scag +- name: Install hourly crontab to update subscriptions and run jamdog ansible.builtin.cron: special_time: daily - name: Run scag - job: >- - git -C "{{ src_dir }}/subscriptions" pull; - scag + name: Run jamdog + job: git -C "{{ src_dir }}/subscriptions" pull; jamdog diff --git a/roles/jamdog/templates/header.html b/roles/jamdog/templates/header.html new file mode 100644 index 0000000..1e6ee30 --- /dev/null +++ b/roles/jamdog/templates/header.html @@ -0,0 +1,10 @@ +<nav> + <ul> + <li> + <a href=/>Home</a> + </li> + <li> + <a href=/{{ feed_rss_path }}>RSS</a> + </li> + </ul> +</nav> diff --git a/roles/scag/templates/scag.toml b/roles/jamdog/templates/jamdog.toml index 9eafa6c..9eafa6c 100644 --- a/roles/scag/templates/scag.toml +++ b/roles/jamdog/templates/jamdog.toml diff --git a/roles/scag/templates/nginx/feed.conf b/roles/jamdog/templates/nginx/feed.conf index 6f650ba..6f650ba 100644 --- a/roles/scag/templates/nginx/feed.conf +++ b/roles/jamdog/templates/nginx/feed.conf diff --git a/roles/scag/templates/header.html b/roles/scag/templates/header.html deleted file mode 100644 index 20ea0f1..0000000 --- a/roles/scag/templates/header.html +++ /dev/null @@ -1,30 +0,0 @@ -<nav> - <ul> - <li> - <a href=/>Home</a> - </li> - <li> - <a href=/{{ feed_rss_path }}>RSS</a> - </li> - </ul> -</nav> - -<script type=module> -function makeDetailsToggler(details) { - return () => { - if (details.hasAttribute('open')) { - details.removeAttribute('open'); - } else { - details.setAttribute('open', ''); - } - }; -} - -for (const entry of document.querySelectorAll('.h-entry')) { - const details = entry.querySelector('details'); - const summary = entry.querySelector('summary'); - const toggleDetails = makeDetailsToggler(entry.querySelector('details')); - entry.addEventListener('click', toggleDetails); - summary.addEventListener('click', toggleDetails); -} -</script> |
