DEV Community

Discussion on: Starting with Ansible in Raspberry Pi

Collapse
 
jibunnokage profile image
Jibun-no-Kage

Apparently something has changed since this was published, the playbook to deploy the ssh key to each host fails with "invalid key specified: /home/pi/.ssh/id_rsa.pub". I validated that the desired key file does exist, in the correct location per the specification in the playbook. If I use ssh-copy-id to deploy the key to any given host, it is accepted, as expected, works as expected. Any suggestions?

Collapse
 
jibunnokage profile image
Jibun-no-Kage

I figured it out... you have a syntax issue in your playbook example...
You need to change the 'key' line. Remove the square brackets, which the left most is missing? And replace with braces. This allows the playbook to run correctly in Ansible core 2.12.1 for example.

Collapse
 
project42 profile image
Project-42

Yes, sorry, that is the problem with some projects like ansible where everything changes so fast :(
I didnt test this for a while, but I may try and see what can be changed