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]