Recently, I have been provisioning cloud servers using Cloud-init. I like it and it is sufficient for my usecase which is simple configuration management.
To run and test Cloud-init scripts, I always have to spin up a new cloud instance and wait for several minutes to check whether it went through or not. It hugely impacts my productivity.
So, what is the best way to run Cloud init locally (on a virtual machine)? Ansible or Chef script can be executed locally in an idempotent matter.
I tried installing cloud-init package and executing cloud-init command. Apparently, it looks for some metadata files created by the Cloud Provider. Is it possible to mock those files?
Thanks in advance.