Ansible Server Management

This website, as well as other services I host on my server, that I manage myself. To manage the server, I use an approach known as "infrastructure as code" (IaC), using Ansible to deploy services on the server.

I use Ansible with as few other dependencies as possible. For example I have some docker-compose.yaml file for each service I am hosting, but I don't use the docker compose Ansible community module. I don't need it. I know how to use docker compose on command line and simply do something like the following:

- name: run some service
  ansible.builtin.shell:
    chdir: "{{some_service_dir}}"
    cmd: >
      docker compose up --wait --detach

This means I can easily update the IaC repository, without needing to worry about any modules not being available. Only changes to core Ansible structure, concepts or syntax would hit me.

# A Note about Ansible Modules

Just as I wrote about my ansible-docker-compose-usage, I feel my way of using Ansible is vindicated by what happens in the Github issues of Ansible Galaxy itself. What's going on there?

  1. No response at all to the question asked about any progress. Also no question, whether any participant is still looking for this, or has found a solution. No pointer.
  2. Closing the issue without any statement about the matter.
  3. Disabling further comments.

Especially point 2 is a commical, yet classic way of doing things in projects on Github. It seems like there is no interest in getting Ansible galaxy installs to be reproducible. I conclude that one is left with the following options for reproducible server setups:

  1. One doesn't need much and can stick to standard Ansible and modules included in Ansible by default. Then one can install Ansible itself in a reproducible way. This is what I currently do.
  2. One finds a way to install Ansible Galaxy modules not via Ansible Galaxy itself, but via some other tool, that allows for reproducibility. * Maybe GNU Guix? Apparently not. Ansible Galaxy modules are not available in Guix yet. One would have to get into Guix and add what one needs, or run ones own Guix channel and add things there. * Maybe Nix? No idea, since I have no experience with Nix.
  3. One uses a different tool for server setup than Ansible.