Introduction
Architecture
SSH to Pi with keys
Since there is no agent to listen in, the controller machine needs to use a way to remote into the target machine to be configured. Ansible uses SSH³ to do the same.
The default way is to run the Ansible scripts and it will ask for login details. For Raspberry to set up that is fine. But there are ways to avoid it by using the SSH public-private key pairs.
There are clearly documented ways to establish a passwordless login to RasPi⁴ using SSH keys. But there are chances of things going wrong and troubleshooting SSH keys to authenticate should be a separate post on its own.
Installing Ansible
Source code
Enough theory. Since it involves scripts that can be enhanced later, it is better to keep in a source control repository. Below is the source code repo link to GitHub.
https://github.com/joymon/ansible-raspberry-home-nas-plex
The readme.md is pretty much updated.
One thing pending is the setting up of the user password that is used to access the shared path from Raspberry.
It will be added soon and updates will be pushed to the same repo.
Ansible in Windows v/s Linux
Reference
- ¹ - https://dzone.com/articles/part-ii-choosing-the-right-infrastructure-as-code
- ² - https://www.ansible.com/
- ³ - https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html
- ⁴ - https://www.raspberrypi.com/documentation/computers/remote-access.html#secure-shell-from-windows-10
- ⁵ - https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
- ⁶ - https://docs.ansible.com/ansible/latest/os_guide/windows_faq.html#can-ansible-run-on-windows
No comments:
Post a Comment