From 3fea17c5559fd864015a6ed874b69d9799df6262 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 25 Jul 2020 17:36:37 +0200 Subject: [PATCH] :bug: Fix Ansible script --- .gitignore | 3 +++ ansible/roles/2-nk20/tasks/main.yml | 5 ++++- ansible/roles/2-nk20/templates/env_example | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 120000 ansible/roles/2-nk20/templates/env_example diff --git a/.gitignore b/.gitignore index f9082403..2372bf46 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,11 @@ coverage # Local data secrets.py +.env +map.json *.log media/ + # Virtualenv env/ venv/ diff --git a/ansible/roles/2-nk20/tasks/main.yml b/ansible/roles/2-nk20/tasks/main.yml index 0c6d0213..d150a1b6 100644 --- a/ansible/roles/2-nk20/tasks/main.yml +++ b/ansible/roles/2-nk20/tasks/main.yml @@ -15,7 +15,10 @@ force: true - name: Use default env vars (should be updated!) - command: cp /var/www/note_kfet/.env_example /var/www/note_kfet/.env + template: + src: "env_example" + dest: "/var/www/note_kfet/.env" + mode: 0644 - name: Update permissions for note_kfet dir file: diff --git a/ansible/roles/2-nk20/templates/env_example b/ansible/roles/2-nk20/templates/env_example new file mode 120000 index 00000000..d48f3549 --- /dev/null +++ b/ansible/roles/2-nk20/templates/env_example @@ -0,0 +1 @@ +../../../../.env_example \ No newline at end of file