The most interesting concept is 'Build & Deploy' and it's a pity that it isn't described even on conceptual level.
I think the 'Build & Deploy' for configuration management is the right thing, but it looks like Ansible is not very good tool to implement it (and honestly, I don't know any mainstream tool that is really good at it).
Docker Hub Ansible Awx
I was trying to implement it as follows:
As automation becomes crucial for more and more business cases, there is an increased need to test the automation code itself. This is where ansible-test comes in: developers who want to test their Ansible Content Collections for sanity, unit and integration tests can use ansible-test to achieve testing workflows that integrate with source code repositories. And ansible is greatat creating deployment logic among other things. Where puppet, chef et al. Are primarily for automating a direct machine, Ansible is a general purpose automation framework. Terraform is definitely better at provisioning cloud resources, but Ansible is much better at automating pretty much anything else that you could think of. Ansible AWX is a free and opensource front-end web application that provides a user interface to manage Ansible playbooks and inventories, as well as a Read More » How to Install Ansible AWX on Ubuntu 20.04 LTS. To get started, follow the installation guide at the AWX GitHub repository. All you’ll need is a virtual machine with Docker and Ansible installed, and you’ll be up and running within a few minutes. If you run into trouble, or have questions, check the issues log to see if there’s already help available. Ansible AWX is an open source tool which provides a web-based user interface, REST API, and task engine for easy and collaborative management of Ansible Playbooks and Inventories. AWX allows you to centrally manage Ansible playbooks, inventories, Secrets, and scheduled jobs from a web interface. It is easy to install AWX on Ubuntu 20.04 18.04.
- part of a role is executed locally, building all the configuration files from templates (build);- configuration built locally is rsynced into dedicated directory on target server, deleting unnecessary files etc (sync);- part of a role is executed remotely, setting up symlinks from real configuration paths into synced dir and running all necessary actions (restarting services etc).
Yes, it's possible to write Ansible playbooks and roles that way, but in practice you are permanently struggling with the default Ansible playbooks and roles organizational structure.
Docker Run Ansible/awx_task
I believe the only devops tool that really supports this style of things now is Nix and all the infrastructure around (and conceptually it's perfect, but in practice it has it's drawbacks).