Hello everyone,
I am new to Ansible.I have been trying to execute a Python script in remote nodes however am confused how to do it.I wrote a playbook and tried to execute it however I get some errors.I am using Fedora Linux and Ansible 2.1.0 in a college lab environment and trying to connect 5 nodes.
Here's my Playbook
# bootstrap.yml
---
- hosts: all
tasks:
- name: Copy file
copy: src=/usr10/bhandara/Desktop/PythonDriver-master/client/modeling2_client.py dest=/home/test_user/modeling2_client.py
- name: Execute script
command: /home/test_user/modeling2_client.py
I get the following error when I try to execute it:
TASK [Copy file] ***************************************************************
fatal: [
jazz923.cs.lafayette.edu]: FAILED! => {"changed": false, "checksum": "97a618f74393c38eb5c6190523c93c0daeffb47c", "failed": true, "msg": "Destination directory /home/test_user does not exist"}
fatal: [
jazz917.cs.lafayette.edu]: FAILED! => {"changed": false, "checksum": "97a618f74393c38eb5c6190523c93c0daeffb47c", "failed": true, "msg": "Destination directory /home/test_user does not exist"}
fatal: [
jazz924.cs.lafayette.edu]: FAILED! => {"changed": false, "checksum": "97a618f74393c38eb5c6190523c93c0daeffb47c", "failed": true, "msg": "Destination directory /home/test_user does not exist"}
fatal: [
jazz902.cs.lafayette.edu]: FAILED! => {"changed": false, "checksum": "97a618f74393c38eb5c6190523c93c0daeffb47c", "failed": true, "msg": "Destination directory /home/test_user does not exist"}
fatal: [
jazz901.cs.lafayette.edu]: FAILED! => {"changed": false, "checksum": "97a618f74393c38eb5c6190523c93c0daeffb47c", "failed": true, "msg": "Destination directory /home/test_user does not exist"}
I'd be obliged if someone could tell me what kind of directory we need to make in remote machines.