Issue
I'm starting to learn about DevOps and configuration management (CM). I am setting up my home network of RasPi 4B devices, and I intend to configure them using Ansible, following this guide on opensource.com. What I don't get though, is how I can possibly set up my Ansible host / server itself using CM as well? Presumably, the host can't update the client if the client is the host itself!
The guide I pointed to above implies that I should install Ansible on a laptop or PC. That sounds great, but in the longer-term, I eventually want all of my home network devices to come under CM control, including the RasPi's, laptops & PC's, and even our Android phones. This suggests to me that the solution is a dedicated Ansible host, running on a separate RasPi.
The paradox is, how do I get that host machine also to be under CM control, as well? 🤯
Solution
It's perfectly fine to use Ansible to configure controller. All you have to do is put a host in inventory with ansible_connection: local
variable. There are few modules which are not working for localhost, though: reboot
, wait_for_connection
, etc.
Actually, many people uses Ansible to configure their own linux laptops.
Answered By - George Shuklin