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?
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.
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
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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?
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.
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