From a924fac977a46c43c2c6d672cd72e74a882bea4e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 21 Aug 2019 16:12:07 +0200 Subject: [PATCH] dist-git/pagure: Enable the pagure-dist-git 3rd party plugin in staging Signed-off-by: Pierre-Yves Chibon --- roles/distgit/pagure/tasks/main.yml | 1 + roles/distgit/pagure/templates/pagure.wsgi | 3 +++ roles/distgit/pagure/templates/pagure_plugins.cfg | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 roles/distgit/pagure/templates/pagure_plugins.cfg diff --git a/roles/distgit/pagure/tasks/main.yml b/roles/distgit/pagure/tasks/main.yml index 2f68a5a08b..d288cfc7b1 100644 --- a/roles/distgit/pagure/tasks/main.yml +++ b/roles/distgit/pagure/tasks/main.yml @@ -102,6 +102,7 @@ with_items: - { file: pagure.cfg, location: /etc/pagure } - { file: alembic.ini, location: /etc/pagure } + - { file: pagure_plugins.cfg, location: /etc/pagure } tags: - config - web diff --git a/roles/distgit/pagure/templates/pagure.wsgi b/roles/distgit/pagure/templates/pagure.wsgi index 921182bd45..3184dd70e6 100644 --- a/roles/distgit/pagure/templates/pagure.wsgi +++ b/roles/distgit/pagure/templates/pagure.wsgi @@ -10,6 +10,9 @@ import pkg_resources import os ## Set the environment variable pointing to the configuration file os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg' +{% if env == 'staging' %} +os.environ['PAGURE_PLUGIN'] = '/etc/pagure/pagure_plugins.cfg' +{% endif %} ## Set the environment variable if the tmp folder needs to be moved ## Is necessary to work around bug in libgit2: diff --git a/roles/distgit/pagure/templates/pagure_plugins.cfg b/roles/distgit/pagure/templates/pagure_plugins.cfg new file mode 100644 index 0000000000..41a1d885c8 --- /dev/null +++ b/roles/distgit/pagure/templates/pagure_plugins.cfg @@ -0,0 +1,3 @@ +from pagure_distgit import plugin + +PLUGINS = [plugin.DISTGIT_NS]