From 23cc5ac53dae9a373bbab3fa3ca1db983b4501f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20M=C3=BCns?= Date: Thu, 30 Apr 2020 20:54:43 +0200 Subject: [PATCH] [FIX] Do not always jump to ~ when bash gets started --- tasks/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 853d7cb..edf4078 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,8 +23,7 @@ blockinfile: | dest=/etc/bash.bashrc backup=no insertbefore="# If not running interactively" - content="cd ~ - export NVM_DIR=\"{{ nvm_dir }}\" + content="export NVM_DIR=\"{{ nvm_dir }}\" [ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\" [ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\"" when: ansible_os_family == "Debian" @@ -32,8 +31,7 @@ - name: Add the NVM's variables to all the profiles in the system (RedHat) blockinfile: | dest=/etc/bashrc backup=no - content="cd ~ - export NVM_DIR=\"{{ nvm_dir }}\" + content="export NVM_DIR=\"{{ nvm_dir }}\" [ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\" [ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\"" when: ansible_os_family == "RedHat"