I have a list of aliases in a file, .bash_aliases
, which is being copied to remote servers with ansible playbook
. The file is getting copied to the destination but the .bashrc
(which in turns load the .bash_aliases
) file is not getting loaded using the following ansible task.
I have tried giving the executable argument
- name: source the .bashrc file
shell: source ~/.bashrc
args:
executables: "/bin/bash"
Without argument
- name: source the .bashrc file
shell: source ~/.bashrc
With raw module
- name: source the .bashrc file
raw: source ~/.bashrc
With command module - name: source the .bashrc file command: source ~/.bashrc
Nothing works!!! Any help