Add and install the alembic.ini for MM2
This commit is contained in:
parent
fd49c25206
commit
07cd4b2c3c
4 changed files with 66 additions and 8 deletions
|
@ -24,9 +24,13 @@
|
|||
file: path=/var/log/mirrormanager state=directory owner=mirrormanager group=mirrormanager mode=0755
|
||||
|
||||
- name: install MM configuration file
|
||||
template: src={{ roles }}/mirrormanager/frontend2/templates/mirrormanager2.cfg
|
||||
dest=/etc/mirrormanager/mirrormanager2.cfg
|
||||
mode=600 owner=mirrormanager group=mirrormanager
|
||||
template: src={{ item.file }} dest={{ item.dest }}
|
||||
owner=mirrormanager group=mirrormanager mode=0600
|
||||
with_items:
|
||||
- { file: {{ roles }}/mirrormanager/frontend2/templates/mirrormanager2.cfg,
|
||||
dest: /etc/mirrormanager/mirrormanager2.cfg }
|
||||
- { file: {{ roles }}/mirrormanager/frontend2/templates/alembic.ini,
|
||||
dest: /etc/mirrormanager/alembic.ini }
|
||||
tags:
|
||||
- config
|
||||
|
||||
|
|
|
@ -21,11 +21,15 @@
|
|||
file: path=/etc/mirrormanager state=directory
|
||||
|
||||
- name: install MM configuration file
|
||||
template: src={{ roles }}/mirrormanager/frontend2/templates/mirrormanager2.cfg
|
||||
dest=/etc/mirrormanager/mirrormanager2.cfg
|
||||
mode=600 owner=mirrormanager group=mirrormanager
|
||||
tags:
|
||||
- config
|
||||
template: src={{ item.file }} dest={{ item.dest }}
|
||||
owner=mirrormanager group=mirrormanager mode=0600
|
||||
with_items:
|
||||
- { file: {{ roles }}/mirrormanager/frontend2/templates/mirrormanager2.cfg,
|
||||
dest: /etc/mirrormanager/mirrormanager2.cfg }
|
||||
- { file: {{ roles }}/mirrormanager/frontend2/templates/alembic.ini,
|
||||
dest: /etc/mirrormanager/alembic.ini }
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: install the cron job
|
||||
copy: src=crawler.cron dest=/etc/cron.d/mm2_crawler.cron
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
with_items:
|
||||
- { file: mirrormanager.conf, dest: /etc/httpd/conf.d/mirrormanager.conf }
|
||||
- { file: mirrormanager2.cfg, dest: /etc/mirrormanager/mirrormanager2.cfg }
|
||||
- { file: alembic.ini, dest: /etc/mirrormanager/alembic.ini }
|
||||
- { file: mirrormanager2.wsgi, dest: /var/www/mirrormanager2.wsgi }
|
||||
notify:
|
||||
- restart httpd
|
||||
|
|
49
roles/mirrormanager/frontend2/templates/alembic.ini
Normal file
49
roles/mirrormanager/frontend2/templates/alembic.ini
Normal file
|
@ -0,0 +1,49 @@
|
|||
# A generic, single database configuration.
|
||||
|
||||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = /usr/share/mirrormanager2/alembic
|
||||
|
||||
# template used to generate migration files
|
||||
# file_template = %%(rev)s_%%(slug)s
|
||||
|
||||
# set to 'true' to run the environment during
|
||||
# the 'revision' command, regardless of autogenerate
|
||||
# revision_environment = false
|
||||
|
||||
sqlalchemy.url = postgresql://{{ mirrormanager_db_user }}:{{ mirrormanager_db_pass }}@{{ mirrormanager_db_host }}/{{ mirrormanager_db_name }}
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
keys = root,sqlalchemy,alembic
|
||||
|
||||
[handlers]
|
||||
keys = console
|
||||
|
||||
[formatters]
|
||||
keys = generic
|
||||
|
||||
[logger_root]
|
||||
level = WARN
|
||||
handlers = console
|
||||
qualname =
|
||||
|
||||
[logger_sqlalchemy]
|
||||
level = WARN
|
||||
handlers =
|
||||
qualname = sqlalchemy.engine
|
||||
|
||||
[logger_alembic]
|
||||
level = INFO
|
||||
handlers =
|
||||
qualname = alembic
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = NOTSET
|
||||
formatter = generic
|
||||
|
||||
[formatter_generic]
|
||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %H:%M:%S
|
Loading…
Add table
Add a link
Reference in a new issue