Import the datanommer role from the main ansible repo - tweaked a little
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
735d46dc98
commit
befd9b5b28
4 changed files with 100 additions and 0 deletions
41
ansible/roles/datanommer/tasks/main.yml
Normal file
41
ansible/roles/datanommer/tasks/main.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# This is a *very* simple role. The config needed for fedmsg-relay to operate
|
||||
# correctly is actually included as part of the fedmsg/base role.
|
||||
|
||||
- name: install datanommer packages
|
||||
package:
|
||||
state: present
|
||||
name:
|
||||
- python-datanommer-consumer
|
||||
- python-datanommer-models
|
||||
- python-psycopg2
|
||||
- datanommer-commands
|
||||
tags:
|
||||
- packages
|
||||
- datanommer
|
||||
|
||||
- name: copy alembic config
|
||||
template: >
|
||||
src=alembic.ini
|
||||
dest=/usr/share/datanommer.models/alembic.ini
|
||||
mode=0640
|
||||
tags:
|
||||
- config
|
||||
- datanommer
|
||||
notify:
|
||||
- restart fedmsg-hub
|
||||
|
||||
- name: copy datanommer config itself
|
||||
template: >
|
||||
src="{{ item }}"
|
||||
dest="/etc/fedmsg.d/{{item}}"
|
||||
mode=0640
|
||||
owner=fedmsg
|
||||
group=fedmsg
|
||||
with_items:
|
||||
- datanommer.py
|
||||
- fas-credentials.py
|
||||
tags:
|
||||
- config
|
||||
- datanommer
|
||||
notify:
|
||||
- restart fedmsg-hub
|
48
ansible/roles/datanommer/templates/alembic.ini
Normal file
48
ansible/roles/datanommer/templates/alembic.ini
Normal file
|
@ -0,0 +1,48 @@
|
|||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = /usr/share/datanommer.models/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://{{ datanommer_user }}:{{ datanommer_password }}@127.0.0.1:5432/datanommer
|
||||
fedmsg_config_dir = /etc/fedmsg.d/
|
||||
|
||||
# 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
|
5
ansible/roles/datanommer/templates/datanommer.py
Normal file
5
ansible/roles/datanommer/templates/datanommer.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Configuration for the datanommer consumer. A plugin for the fedmsg-hub process.
|
||||
config = {
|
||||
'datanommer.enabled': True,
|
||||
'datanommer.sqlalchemy.url': 'postgresql://{{ datanommer_user }}:{{ datanommer_password }}@127.0.0.1:5432/datanommer',
|
||||
}
|
6
ansible/roles/datanommer/templates/fas-credentials.py
Normal file
6
ansible/roles/datanommer/templates/fas-credentials.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
config = dict(
|
||||
# fas_credentials=dict(
|
||||
# username="fedoradummy",
|
||||
# password="",
|
||||
# ),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue