Hello,
As a beginner of ansible, I tried to run my script test.sh (which is a symbolic link) by le bloc in my playbook:
- hosts: my_host
become: true
become_user: root
tasks: - name: my test
command: /xxx/xx/test.sh
But I got an errer as followed:
fatal: [xxxxxx]: FAILED! => {“changed”: false, “cmd”: “/xxx/xx/test.sh”, “failed”: true, “msg”: “[Errno 2] No such file or directory”, “rc”: 2}
Could anyone help? How could we run a symbolic link on a remote node by command (or another mudule if possible) ?
Thanks a lot,