--- - name: Transfer and execute a script. hosts: all become: true tasks: - name: Copy and Execute the script script: ~/playbooks/CheckMK_server/add_on_target_using_api.sh