turn into installing seafile-mirror via pip(x)
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -2,6 +2,3 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
[submodule "files/seafile-mirror"]
|
|
||||||
path = files/seafile-mirror
|
|
||||||
url = https://src.mehl.mx/mxmehl/seafile-mirror.git
|
|
||||||
|
|||||||
Submodule files/seafile-mirror deleted from 8c54fd318a
@@ -16,11 +16,19 @@
|
|||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- moreutils # chronic
|
- moreutils # chronic
|
||||||
- python3-yaml
|
- pipx
|
||||||
- systemd-container # necessary to use machinectl become_method
|
- systemd-container # necessary to use machinectl become_method
|
||||||
- seafile-cli
|
- seafile-cli
|
||||||
become: false # need to do this as root
|
become: false # need to do this as root
|
||||||
|
|
||||||
|
- name: Install seafile-mirror with pipx
|
||||||
|
command: pipx install seafile-mirror
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Upgrade seafile-mirror with pipx
|
||||||
|
command: pipx upgrade seafile-mirror
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Register user info of {{ seafile_local_user.user }}
|
- name: Register user info of {{ seafile_local_user.user }}
|
||||||
user:
|
user:
|
||||||
name: "{{ seafile_local_user.user }}"
|
name: "{{ seafile_local_user.user }}"
|
||||||
@@ -33,24 +41,11 @@
|
|||||||
|
|
||||||
- name: Ensure directory for Seafile mirror service exists
|
- name: Ensure directory for Seafile mirror service exists
|
||||||
file:
|
file:
|
||||||
path: "{{ seafile_mirror_dir }}/functions"
|
path: "{{ seafile_mirror_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
recurse: true
|
recurse: true
|
||||||
|
|
||||||
- name: Ensure Seafile mirror script and its functions exists
|
|
||||||
copy:
|
|
||||||
src: "seafile-mirror/{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
mode: 0755
|
|
||||||
loop:
|
|
||||||
- {src: "seafile_mirror.py", dest: "{{ seafile_mirror_dir }}/"}
|
|
||||||
- {src: "functions/__init__.py", dest: '{{ seafile_mirror_dir }}/functions/'}
|
|
||||||
- {src: "functions/cachedb.py", dest: '{{ seafile_mirror_dir }}/functions/'}
|
|
||||||
- {src: "functions/helpers.py", dest: '{{ seafile_mirror_dir }}/functions/'}
|
|
||||||
- {src: "functions/seafile.py", dest: '{{ seafile_mirror_dir }}/functions/'}
|
|
||||||
|
|
||||||
|
|
||||||
- name: Ensure Seafile mirror configuration exists
|
- name: Ensure Seafile mirror configuration exists
|
||||||
template:
|
template:
|
||||||
src: seafile_mirror.conf.yaml.j2
|
src: seafile_mirror.conf.yaml.j2
|
||||||
@@ -60,7 +55,7 @@
|
|||||||
- name: Ensure cron entry for Seafile mirror service
|
- name: Ensure cron entry for Seafile mirror service
|
||||||
cron:
|
cron:
|
||||||
name: Seafile Mirror Service
|
name: Seafile Mirror Service
|
||||||
job: "chronic python3 {{ seafile_mirror_dir }}/seafile_mirror.py -c {{ seafile_mirror_dir }} -v"
|
job: "chronic pipx run seafile-mirror -c {{ seafile_mirror_dir }} -v"
|
||||||
hour: "23"
|
hour: "23"
|
||||||
minute: "20"
|
minute: "20"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user