From 5c2df41640e526f2a7a0b1cf15f4cfc7bfc10f44 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 1 Aug 2020 16:32:26 +0200 Subject: [PATCH 1/2] Fix Ansible --- ansible/base.yml | 4 ++++ ansible/roles/6-psql/tasks/main.yml | 2 +- ansible/roles/7-postinstall/tasks/main.yml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ansible/base.yml b/ansible/base.yml index d3845f27..6e455581 100755 --- a/ansible/base.yml +++ b/ansible/base.yml @@ -2,6 +2,10 @@ --- - hosts: bde-nk20-beta.adh.crans.org + vars_prompt: + - name: DB_PASSWORD + prompt: "Password of the database" + private: yes roles: - 1-apt-basic - 2-nk20 diff --git a/ansible/roles/6-psql/tasks/main.yml b/ansible/roles/6-psql/tasks/main.yml index ba313ee1..90ed8096 100644 --- a/ansible/roles/6-psql/tasks/main.yml +++ b/ansible/roles/6-psql/tasks/main.yml @@ -17,7 +17,7 @@ - name: Create role note postgresql_user: name: note - password: "CHANGE_ME" + password: "{{ DB_PASSWORD }}" become_user: postgres - name: Create NK20 database diff --git a/ansible/roles/7-postinstall/tasks/main.yml b/ansible/roles/7-postinstall/tasks/main.yml index b1615a0b..34a9011b 100644 --- a/ansible/roles/7-postinstall/tasks/main.yml +++ b/ansible/roles/7-postinstall/tasks/main.yml @@ -9,7 +9,7 @@ command: /var/www/note_kfet/env/bin/python manage.py migrate args: chdir: /var/www/note_kfet - become_user: www-data + become_user: postgres - name: Compile messages command: /var/www/note_kfet/env/bin/python manage.py compilemessages @@ -21,4 +21,4 @@ command: /var/www/note_kfet/env/bin/python manage.py loaddata initial args: chdir: /var/www/note_kfet - become_user: www-data + become_user: postgres From 43a22cbed44b851285e002992ea6ca6044d981cb Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 1 Aug 2020 16:37:54 +0200 Subject: [PATCH 2/2] :poop: Fix account import --- apps/scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/scripts b/apps/scripts index dd8b48c3..e16629cc 160000 --- a/apps/scripts +++ b/apps/scripts @@ -1 +1 @@ -Subproject commit dd8b48c31d4501d95b3afb00ac9b387397fca957 +Subproject commit e16629cc70c155e4d32244f80684295b459a8a59