mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 02:20:51 +08:00
Mailman: fix initial data
This commit is contained in:
@@ -10,9 +10,13 @@ BASEDIR=`yamlget basedir $CONFFILE`
|
||||
CONFDIR=`yamlget confdir $CONFFILE`
|
||||
INDEXDIR=$BASEDIR/fulltext_index
|
||||
|
||||
echo "static files"
|
||||
django-admin collectstatic --clear --noinput --verbosity 0 --pythonpath $CONFDIR --settings settings
|
||||
django-admin compress --pythonpath $CONFDIR --settings settings
|
||||
echo "db migration"
|
||||
django-admin migrate --pythonpath $CONFDIR --settings settings_admin --noinput
|
||||
echo "load initial data"
|
||||
django-admin loaddata $CONFDIR/initial-data.json --pythonpath $CONFDIR --settings settings
|
||||
mkdir -p $INDEXDIR
|
||||
chown apache:apache -R $INDEXDIR
|
||||
|
||||
@@ -21,9 +25,11 @@ sleep $[ ( $RANDOM % 10 ) + 1 ]s # avoid simultaneous lockups on parallel serve
|
||||
$BASEDIR/bin/pg-give-rights.py > /dev/null
|
||||
|
||||
# SELinux contexts
|
||||
echo "SELinux contexts"
|
||||
restorecon -r "$BASEDIR"
|
||||
|
||||
# Run unit tests
|
||||
echo "unit tests"
|
||||
django-admin test --pythonpath $CONFDIR --settings settings_test hyperkitty postorius
|
||||
|
||||
# Reload Apache to flush the python cache
|
||||
|
||||
@@ -372,8 +372,8 @@
|
||||
- periodic.py
|
||||
|
||||
- name: copy the initial user fixture
|
||||
copy: src=postorius.initial-user.json
|
||||
dest=/etc/postorius/sites/default/initial-user.json
|
||||
template: src=initial-data.json
|
||||
dest={{ mailman_webui_basedir }}/config/initial-data.json
|
||||
owner=root group=apache mode=0640
|
||||
tags: mailman
|
||||
|
||||
|
||||
Reference in New Issue
Block a user