diff --git a/roles/pagure/frontend/files/pagure_mirror.service b/roles/pagure/frontend/files/pagure_mirror.service new file mode 100644 index 0000000000..786eee8114 --- /dev/null +++ b/roles/pagure/frontend/files/pagure_mirror.service @@ -0,0 +1,18 @@ +# This is a systemd's service file for the mirroring service, if you change +# the default value of the CI_CELERY_QUEUE configuration key, do not +# forget to edit it in the ExecStart line below + +[Unit] +Description=Pagure service mirroring projects outside of pagure that asked for it +After=redis.target +Documentation=https://pagure.io/pagure + +[Service] +ExecStart=/usr/bin/celery worker -A pagure.lib.tasks_mirror --loglevel=info -Q pagure_mirror +Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg" +Type=simple +User=paguremirroring +Group=paguremirroring +Restart=on-failure + +[Install] diff --git a/roles/pagure/frontend/tasks/main.yml b/roles/pagure/frontend/tasks/main.yml index 93f9a9c28a..6f7d10a2b0 100644 --- a/roles/pagure/frontend/tasks/main.yml +++ b/roles/pagure/frontend/tasks/main.yml @@ -219,7 +219,7 @@ - stunnel - config -- name: Add the different service files for the different workers +- name: Add the different service files for the different services copy: src={{ item }}.service dest=/etc/systemd/system/{{ item }}.service owner=root group=root mode=0755 @@ -227,6 +227,7 @@ - pagure_fast_worker - pagure_medium_worker - pagure_slow_worker + - pagure_mirror notify: - reload systemd tags: