How to run a symbolic link by module command?

10 views
Skip to first unread message

CHEN YANQING

unread,
Mar 19, 2018, 12:44:54 PM3/19/18
to Ansible Project
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,

Kai Stian Olstad

unread,
Mar 19, 2018, 1:00:41 PM3/19/18
to ansible...@googlegroups.com
Ansible command module does follow symlinks, so you must have some error in the linking.


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages