I am new to ansible, i have the script in the remote machine and the script name is ssh.sh which contains below lines to ssh into some another server and run the script,
ssh @${server} "sh /tmp/script.sh"
the question is if i use shell module to call to the script ssh.sh in the playbook as below, will the ssh command with the above line will work or not???
- hosts: all
tasks:
- name: invoke the script
shell: sh ssh.sh
register: result