raspi-video-sync icon indicating copy to clipboard operation
raspi-video-sync copied to clipboard

Error, on my part, when trying to launch pi playback...

Open reillydonovan opened this issue 11 years ago • 3 comments

Great script! I just wish I could get it to work... I feel like I'm super close but missing something... it took me awhile to get ansible operational on the pi, but its doing the thing and your script is telling me stuff which is nice to see!

I can execute the first script in your example with success: ansible-playbook -i inventory.ini setup.yml --tags="copy_movie"

but the next 3 without success.

Here is what I get for the first script that works: root@raspberrypi:/home/pi/playbooks# ansible-playbook -i inventory.ini setup.yml --tags="copy_movie" -u pi

PLAY [pi1] ******************************************************************** skipping: no hosts matched

PLAY [pi2] ********************************************************************

TASK: [copy over the movie] *************************************************** ok: [192.168.0.1]

PLAY [pi3] ********************************************************************

TASK: [copy over the movie] *************************************************** changed: [192.168.0.2]

PLAY [pi4] ******************************************************************** skipping: no hosts matched

PLAY RECAP ******************************************************************** 192.168.0.1 : ok=1 changed=0 unreachable=0 failed=0
192.168.0.2 : ok=1 changed=1 unreachable=0 failed=0

And for the last one that doesn't:

root@raspberrypi:/home/pi/playbooks# ansible-playbook -i inventory.ini setup.yml --tags="play" -u pi

PLAY [pis] ********************************************************************

TASK: [play the video] ******************************************************** failed: [192.168.0.2] => {"changed": true, "cmd": " python script.py /home/pi/Desktop/movie.mp4 ", "delta": "0:00:00.190085", "end": "2013-09-19 04:47:34.649721", "rc": 2, "start": "2013-09-19 04:47:34.459636"} stderr: python: can't open file 'script.py': [Errno 2] No such file or directory failed: [192.168.0.1] => {"changed": true, "cmd": " python script.py /home/pi/Desktop/movie.mp4 ", "delta": "0:00:00.276689", "end": "2013-10-03 10:08:09.950425", "rc": 2, "start": "2013-10-03 10:08:09.673736"} stderr: python: can't open file 'script.py': [Errno 2] No such file or directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** to retry, use: --limit @/root/setup.retry

192.168.0.1 : ok=0 changed=0 unreachable=0 failed=1
192.168.0.2 : ok=0 changed=0 unreachable=0 failed=1

root@raspberrypi:/home/pi/playbooks#

any suggestions on what I might be missing would be great! Thank you so much!

reillydonovan avatar Oct 03 '13 10:10 reillydonovan

It looks like you copied the movies over but didn't run the setup play. That's what puts the script on the server.

feanil avatar Oct 04 '13 00:10 feanil

thanks for your response but I still seem to be unsuccessful. When I run your second script:

ansible-playbook -i inventory.ini setup.yml --tags="setup" --extra-vars="one_time=true"

I receive an error akin to the following: "Could not import python modules: apt, apt_pkg. Please install python-apt package."

so I tried installing python-apt by executing: apt-get -y install python-apt

and aptitude by executing: sudo aptitude update

I have done this for all pi's in the array.
I have also installed ansible on all pis in the array and the recommended python dependencies. Still to no avail. I can successfully ping all the pis using ansible -m all ping so ansible appears to be working.

Also, when running one pi as the server, does that play a video too?

Any suggestions would be very appreciated! Thank you so much!

reillydonovan avatar Mar 17 '14 02:03 reillydonovan

The server does play one of the videos so you could use the PI as one server. Can you post the output of the command in a gist(gist.githhub.com) and post the link here.

On Sun, Mar 16, 2014 at 10:33 PM, reillydonovan [email protected]:

thanks for your response but I still seem to be unsuccessful. When I run your second script:

ansible-playbook -i inventory.ini setup.yml --tags="setup" --extra-vars="one_time=true"

I receive an error akin to the following: "Could not import python modules: apt, apt_pkg. Please install python-apt package."

so I tried installing python-apt by executing: apt-get -y install python-apt

and aptitude by executing: sudo aptitude update

I have done this for all pi's in the array.

I have also installed ansible on all pis in the array and the recommended python dependencies. Still to no avail. I can successfully ping all the pis using ansible -m all ping so ansible appears to be working.

Also, when running one pi as the server, does that play a video too?

Any suggestions would be very appreciated! Thank you so much!

Reply to this email directly or view it on GitHubhttps://github.com/feanil/raspi-video-sync/issues/1#issuecomment-37780745 .

feanil avatar Mar 17 '14 14:03 feanil