added permanent solution to dbschema install
This commit is contained in:
parent
4c6533fc59
commit
efb1e5c9a3
|
@ -73,7 +73,7 @@ lacre_pooling_max_overflow: '10'
|
|||
## Lacre daemon
|
||||
lacre_daemon_host: '127.0.0.1'
|
||||
lacre_daemon_port: '10025'
|
||||
lacre_systemd_execstart: 'python -m lacre.daemon'
|
||||
lacre_systemd_execstart: '{{ lacre_homedir }}/venv/bin/python{{ lacre_python_version }} -m lacre.daemon'
|
||||
lacre_systemd_restartsec: '3'
|
||||
|
||||
# Lacre logger
|
||||
|
|
|
@ -30,6 +30,13 @@ LACRE_IDENTITIES = sqlalchemy.Table('lacre_identities', _meta,
|
|||
# Key fingerprint
|
||||
sqlalchemy.Column('fingerprint', sqlalchemy.String(64), index=True))
|
||||
|
||||
LACRE_LOCKS = sqlalchemy.Table('lacre_locks', _meta,
|
||||
sqlalchemy.Column('id', sqlalchemy.Integer, primary_key=True),
|
||||
sqlalchemy.Column('ip', sqlalchemy.String(16), index=True),
|
||||
sqlalchemy.Column('time', sqlalchemy.Integer),
|
||||
sqlalchemy.Column('action', sqlalchemy.String(16), index=True),
|
||||
sqlalchemy.Column('num', sqlalchemy.Integer))
|
||||
|
||||
def _validate_config():
|
||||
missing = conf.validate_config()
|
||||
if missing:
|
||||
|
|
|
@ -81,16 +81,9 @@
|
|||
register: lacre_db_info
|
||||
ignore_errors: yes
|
||||
|
||||
## Temporary tasks for deploying db
|
||||
- name: '[INSTALL] - Copy script with dbschema'
|
||||
copy:
|
||||
src: files/temp_dbschema.py
|
||||
dest: '/tmp/temp_dbschema.py'
|
||||
|
||||
- name: '[INSTALL] - Run dbschema'
|
||||
shell:
|
||||
cmd: '{{ lacre_homedir }}/venv/bin/python{{ lacre_python_version }} /tmp/temp_dbschema.py'
|
||||
cmd: '{{ lacre_homedir }}/venv/bin/python{{ lacre_python_version }} -m {{ lacre_app_dir }}/lacre/lacre.admin db -i'
|
||||
become: 'yes'
|
||||
become_user: '{{ lacre_username }}'
|
||||
|
||||
#####
|
||||
|
|
|
@ -7,7 +7,6 @@ Type=simple
|
|||
User={{ lacre_username }}
|
||||
Group={{ lacre_group }}
|
||||
WorkingDirectory={{ lacre_app_dir }}
|
||||
Environment=GPG_MAILGATE_CONFIG={{ lacre_config_file }}
|
||||
ExecStart={{ lacre_systemd_execstart }}
|
||||
Restart=always
|
||||
RestartSec={{ lacre_systemd_restartsec }}
|
||||
|
|
Loading…
Reference in New Issue