mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
move admin user creation
This commit is contained in:
parent
3f5cc70434
commit
8eaf37e328
3 changed files with 19 additions and 6 deletions
|
@ -126,9 +126,7 @@
|
|||
- { src: 'lokole_restarter.conf' }
|
||||
|
||||
- name: Create Lokole admin user with password, for http://box{{ lokole_url }} # http://box/lokole
|
||||
shell: |
|
||||
. {{ lokole_run_directory }}/webapp_secrets.sh
|
||||
{{ lokole_venv }}/bin/manage.py createadmin --name='{{ lokole_admin_user }}' --password='{{ lokole_admin_password }}'
|
||||
include_tasks: setup.yml
|
||||
|
||||
- name: Install /etc/{{ apache_conf_dir }}/lokole.conf from template, for http://box{{ lokole_url }} via Apache # http://box/lokole
|
||||
template:
|
||||
|
@ -137,12 +135,12 @@
|
|||
mode: 0644
|
||||
when: apache_install
|
||||
|
||||
# RECORD Lokole AS INSTALLED
|
||||
|
||||
- name: "Set 'lokole_installed: True'"
|
||||
set_fact:
|
||||
lokole_installed: True
|
||||
|
||||
# RECORD Lokole AS INSTALLED
|
||||
|
||||
- name: "Add 'lokole_installed: True' to {{ iiab_state_file }}"
|
||||
lineinfile:
|
||||
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
state: stopped
|
||||
when: not lokole_enabled
|
||||
|
||||
#- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
||||
- name: Enable/Disable/Restart Apache if primary
|
||||
include_tasks: apache.yml
|
||||
when: not nginx_enabled
|
||||
|
|
16
roles/lokole/tasks/setup.yml
Normal file
16
roles/lokole/tasks/setup.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
- name: Create Lokole admin user with password, for http://box{{ lokole_url }} # http://box/lokole
|
||||
shell: |
|
||||
while read envvar; do export "$envvar"; done < {{ lokole_run_dir }}/settings.env
|
||||
{{ lokole_venv }}/bin/manage.py createadmin --name='{{ lokole_admin_user }}' --password='{{ lokole_admin_password }}'
|
||||
when: lokole_installed is undefined
|
||||
|
||||
- name: Change owner of dbfiles
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: file
|
||||
owner: "{{ lokole_user }}"
|
||||
group: "{{ lokole_user }}"
|
||||
mode: u=rw,g=rw
|
||||
loop:
|
||||
- { path: "{{ lokole_run_dir }}/users.sqlite3" }
|
||||
# - { path: "{{ lokole_run_dir }}/celery.sqlite3" }
|
Loading…
Add table
Add a link
Reference in a new issue