Fix Ansible

This commit is contained in:
Yohann D'ANELLO 2020-08-01 16:32:26 +02:00
parent e50bff8e14
commit 5c2df41640
3 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,10 @@
--- ---
- hosts: bde-nk20-beta.adh.crans.org - hosts: bde-nk20-beta.adh.crans.org
vars_prompt:
- name: DB_PASSWORD
prompt: "Password of the database"
private: yes
roles: roles:
- 1-apt-basic - 1-apt-basic
- 2-nk20 - 2-nk20

View File

@ -17,7 +17,7 @@
- name: Create role note - name: Create role note
postgresql_user: postgresql_user:
name: note name: note
password: "CHANGE_ME" password: "{{ DB_PASSWORD }}"
become_user: postgres become_user: postgres
- name: Create NK20 database - name: Create NK20 database

View File

@ -9,7 +9,7 @@
command: /var/www/note_kfet/env/bin/python manage.py migrate command: /var/www/note_kfet/env/bin/python manage.py migrate
args: args:
chdir: /var/www/note_kfet chdir: /var/www/note_kfet
become_user: www-data become_user: postgres
- name: Compile messages - name: Compile messages
command: /var/www/note_kfet/env/bin/python manage.py compilemessages 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 command: /var/www/note_kfet/env/bin/python manage.py loaddata initial
args: args:
chdir: /var/www/note_kfet chdir: /var/www/note_kfet
become_user: www-data become_user: postgres