ansible icon indicating copy to clipboard operation
ansible copied to clipboard

feat(snmp_exporter): fix dry-runs on new machines

Open pieterlexis-tomtom opened this issue 1 year ago • 2 comments

This does not fail a dry run on machines where snmp_exporter is not yet installed.

pieterlexis-tomtom avatar Jan 15 '25 14:01 pieterlexis-tomtom

Is this really needed? ansible.builtin.systemd has full support for check_mode

gardar avatar Feb 18 '25 23:02 gardar

Is this really needed? ansible.builtin.systemd has full support for check_mode

From what I have noticed: if you run this role in check mode on a blank slate, the unitfile is not put unto the system. When the service is started (or restarted) the dry-run will error out with Could not find the requested service snmp_exporter: host, stopping the dry-run. I can try to do some more experiments.

pieterlexis-tomtom avatar Feb 19 '25 08:02 pieterlexis-tomtom