I have a server with custom made LXC images. My users can create containers from thoses images.
Until now, when I needed to change some configuration to the image, I went into a tedious workflow of making a container from the current image, applying the changes I need, deleting the image and replacing it with a snapshot of the modified container. On the side, I keep a list of all changes applied to that image. Did I mention it was tedious?
I recently discovered Ansible and I figured it would solve all my problems! I could start with the equivalent of my "list of configurations" and write it in the form of a playbook, then run Ansible to do everything on its own, with the difference that the container would be created empty and not based on the previous version of the image, which seems cleaner.
Question: is there an Ansible way to create a LXC image or do I need to script it myself (container → snapshot → image)?
Alternative question: do you have a better idea to automate my workflow?