Override the default pagure_worker as the user is different

This commit is contained in:
Pierre-Yves Chibon 2017-06-30 14:36:40 +02:00
parent 4fa601c0d1
commit 578d5a0afa
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,15 @@
[Unit]
Description=Pagure worker for backend git interaction
After=redis.target
Documentation=https://pagure.io/pagure
[Service]
ExecStart=/usr/bin/celery worker -A pagure.lib.tasks --loglevel=info --autoreload
Environment="PAGURE_CONFIG=/etc/pagure/pagure.cfg"
Type=simple
User=pagure
Group=pagure
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -136,6 +136,16 @@
tags:
- pagure
- name: Override the default pagure_worker.service file to change the user it is run under
copy: src=pagure_worker.service
dest=/usr/lib/systemd/system/pagure_worker.service
owner=root group=root mode=0755
notify:
- reload systemd
- restart pagure_worker
tags:
- pagure
- name: set sebooleans so pagure can talk to the db
seboolean: name=httpd_can_network_connect_db
state=true