diff --git a/roles/copr/frontend/files/cron.weekly/copr-frontend-optional b/roles/copr/frontend/files/cron.weekly/copr-frontend-optional new file mode 100755 index 0000000000..3e45a0dd39 --- /dev/null +++ b/roles/copr/frontend/files/cron.weekly/copr-frontend-optional @@ -0,0 +1,8 @@ +#! /bin/sh + +# This file is provided by copr-frontend.rpm package, but we edit it for the +# purpose of Fedora Copr instance. Please consult +# $ dnf diff copr-frontend /etc/cron.weekly/copr-frontend-optional +# to see our changes, and perhaps update when appropriate. + +runuser -c 'copr-frontend usage-treemap -D /var/www/html/usage/' - copr-fe diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 7df7c1f088..e7500519df 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -10,6 +10,11 @@ command: "restorecon -vvRF /var/lib/pgsql" when: pgsql_ls.stdout is defined and 'postgresql_db_t' not in pgsql_ls.stdout +- name: install weekly custom copr-frontend-crontab + copy: src=cron.weekly/copr-frontend-optional dest=/etc/cron.weekly/ + mode=0755 + tags: [cron_tasks] + - name: install daily custom copr-frontend-crontab copy: src=cron.daily/copr-frontend-optional dest=/etc/cron.daily/ mode=0755 @@ -74,6 +79,10 @@ file: state=directory path=/var/www/html/db_dumps/ owner=copr-fe mode=755 +- name: directory for usage graphs + file: state=directory path=/var/www/html/usage/ + owner=copr-fe mode=755 + - name: install copr configs template: src="copr.conf" dest=/etc/copr/copr.conf mode=600 notify: