From dfbf9972c2d37a54a41b062268af2e2468324544 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 29 Dec 2020 23:27:51 +0100 Subject: [PATCH] By default, automatically change directory to /var/www/note_kfet and source the Python virtual environment in the .bashrc file Signed-off-by: Yohann D'ANELLO --- ansible/roles/2-nk20/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ansible/roles/2-nk20/tasks/main.yml b/ansible/roles/2-nk20/tasks/main.yml index 3852894d..e39863b5 100644 --- a/ansible/roles/2-nk20/tasks/main.yml +++ b/ansible/roles/2-nk20/tasks/main.yml @@ -36,3 +36,13 @@ dest: /etc/cron.d/note owner: root group: root + +- name: Set default directory to /var/www/note_kfet + lineinfile: + path: /etc/skel/.bashrc + line: 'cd /var/www/note_kfet' + +- name: Automatically source Python virtual environment + lineinfile: + path: /etc/skel/.bashrc + line: 'source /var/www/note_kfet/env/bin/activate'