r/vmagent: Rework as container deployment

Like the _blackbox-exporter_ role, the _vmagent_ role now deploys
`vmagent` as a container.  This simplifies the process considerably,
eliminating the download/transfer step.

While refactoring this role, I also changed how the trusted CA
certificates are handled.  Rather than copy files, the role now expects
a `vmagent_ca_certs` variable.  This variable is a mapping of
certificate name (file name without extension) to PEM contents.  This
allows certificates to be defined using normal host/group variables.
This commit is contained in:
2025-01-26 06:55:11 -06:00
parent dcf1e5adfc
commit 3e8ac36f88
7 changed files with 66 additions and 40 deletions

View File

@@ -1,11 +1,4 @@
- name: ensure vmagent systemd unit is installed
copy:
src: vmagent.service
dest: /etc/systemd/system/vmagent.service
mode: '0644'
notify:
- reload systemd
- restart vmagent
tags:
- service
- systemd
- name: ensure podman is installed
package:
name: podman
state: present