1
- name: restarting .bash_profile
command: chdir=/home/ec2-user/ source .bash_profile
我试图使用源命令.bash_profile文件中的.bash_profile文件,但它抛出一个错误:Ansible - 无法找到时,我用下面的代码
{"changed": false, "cmd": "source .bash_profile", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}
但该文件存在于给定路径中。有没有什么办法可以运行.bash_profile
文件的命令?