<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ansible-role-prometheus-target/molecule, branch master</title>
<subtitle>Ansible role for pushing targets to prometheus instance</subtitle>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/'/>
<entry>
<title>Fix pre-commit lint violations</title>
<updated>2026-08-10T23:45:24+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-08-10T23:39:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=ac3c94b3159acf91674fdd61396e5811a6a55fb3'/>
<id>ac3c94b3159acf91674fdd61396e5811a6a55fb3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `state` option for removing exporters</title>
<updated>2026-08-10T22:54:41+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-08-10T22:54:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=c267536ecfbcf37e68226ade2ed29c3b1f356a98'/>
<id>c267536ecfbcf37e68226ade2ed29c3b1f356a98</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: expand Molecule coverage for exporter behavior</title>
<updated>2026-07-21T17:58:10+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-07-21T17:58:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=c33948c219032977779a7ef6d82c16e84f37b81a'/>
<id>c33948c219032977779a7ef6d82c16e84f37b81a</id>
<content type='text'>
Cover lineinfile and YAML behavior for default exporters, skipped
defaults, exporters without IDs, duplicate definitions, path and host
overrides, path-prefix precedence, and inherited label overrides.

Verify YAML handling of null documents, multiple files, labeled and
unlabeled groups, and duplicate targets.

Add test coverage for command and shell handlers using run-once,
per-host, disabled, and non-become configurations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cover lineinfile and YAML behavior for default exporters, skipped
defaults, exporters without IDs, duplicate definitions, path and host
overrides, path-prefix precedence, and inherited label overrides.

Verify YAML handling of null documents, multiple files, labeled and
unlabeled groups, and duplicate targets.

Add test coverage for command and shell handlers using run-once,
per-host, disabled, and non-become configurations.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: prevent lost YAML targets during parallel writes</title>
<updated>2026-07-21T17:11:08+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-07-21T17:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=0055971afd5524f0df00fc8d2203a80f828885f7'/>
<id>0055971afd5524f0df00fc8d2203a80f828885f7</id>
<content type='text'>
The YAML strategy performed a separate read-modify-write operation for
every managed host. Because these tasks were delegated to the same
Prometheus host, parallel Ansible forks could read the same original
file before any fork wrote its update.

Each fork then generated YAML containing only its own target. Although
the copy module atomically replaced the file, it did not make the full
read-modify-write sequence atomic. The last fork to write therefore
overwrote targets added by earlier forks.

Collect exporter updates from all hosts through hostvars, process them
in one run_once operation, and write each distinct target file once.
This preserves every target without requiring users to set serial.

Add parallel coverage for multiple target files and label groups, and
reset the fixtures on every convergence so stale files cannot hide the
race.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The YAML strategy performed a separate read-modify-write operation for
every managed host. Because these tasks were delegated to the same
Prometheus host, parallel Ansible forks could read the same original
file before any fork wrote its update.

Each fork then generated YAML containing only its own target. Although
the copy module atomically replaced the file, it did not make the full
read-modify-write sequence atomic. The last fork to write therefore
overwrote targets added by earlier forks.

Collect exporter updates from all hosts through hostvars, process them
in one run_once operation, and write each distinct target file once.
This preserves every target without requiring users to set serial.

Add parallel coverage for multiple target files and label groups, and
reset the fixtures on every convergence so stale files cannot hide the
race.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: split tests by strategy</title>
<updated>2026-07-21T16:59:45+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-07-21T16:59:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=2287658a7c9aa0c8755d611c1552fb66d96eaa47'/>
<id>2287658a7c9aa0c8755d611c1552fb66d96eaa47</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: bump and fix pre-commit errors</title>
<updated>2026-07-03T18:15:09+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin@wilk.cx</email>
</author>
<published>2026-07-03T18:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=9368443af5c0cdfbadbd54f92814dadce1c4e663'/>
<id>9368443af5c0cdfbadbd54f92814dadce1c4e663</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add run_once option for handlers</title>
<updated>2023-10-11T13:49:45+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin.wilk@tum.de</email>
</author>
<published>2023-10-11T13:34:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=c9c812343831be1bb56965b2aeff41eecdae0a11'/>
<id>c9c812343831be1bb56965b2aeff41eecdae0a11</id>
<content type='text'>
This adds the run_once option for the two handler types (shell and
command). The variables `prometheus_target_handler_command_run_once`
and `prometheus_target_handler_shell_run_once` are introduced to
control this behavior.

For this change a switch from the Ansible Handlers to regular tasks was
necessary to  enforce run_once behavior with delegated hosts. If you
don't rely on handler specific features such as deferring, nothing
changes when using the role.

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the run_once option for the two handler types (shell and
command). The variables `prometheus_target_handler_command_run_once`
and `prometheus_target_handler_shell_run_once` are introduced to
control this behavior.

For this change a switch from the Ansible Handlers to regular tasks was
necessary to  enforce run_once behavior with delegated hosts. If you
don't rely on handler specific features such as deferring, nothing
changes when using the role.

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to use exporter without id property</title>
<updated>2023-06-15T20:52:07+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin.wilk@tum.de</email>
</author>
<published>2023-06-15T20:40:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=579b168b2c93daee67ede17ee3289da1678b3833'/>
<id>579b168b2c93daee67ede17ee3289da1678b3833</id>
<content type='text'>
The id property of the exporter is used for checking the default values
specified in `prometheus_target_exporter_defaults` variable.
However when both the `host` and the `path` fields are specified
manually in the `prometheus_target_exporter` list this id is never
looked up.
The way the templating was handled however, still resulted in an error
when leaving out the id field.
The templating code was now rewritten to allow for the following
exporter configuraion to run:

prometheus_target_exporter:
- { host: exporter_without_id, path: /opt/simple_target4.yml }

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The id property of the exporter is used for checking the default values
specified in `prometheus_target_exporter_defaults` variable.
However when both the `host` and the `path` fields are specified
manually in the `prometheus_target_exporter` list this id is never
looked up.
The way the templating was handled however, still resulted in an error
when leaving out the id field.
The templating code was now rewritten to allow for the following
exporter configuraion to run:

prometheus_target_exporter:
- { host: exporter_without_id, path: /opt/simple_target4.yml }

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to specify target path prefix</title>
<updated>2023-06-11T16:53:04+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin.wilk@tum.de</email>
</author>
<published>2023-06-11T16:53:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=232bdca2add4253981b0873188663069f74a0610'/>
<id>232bdca2add4253981b0873188663069f74a0610</id>
<content type='text'>
This will decrease the amount of redundant configuration for users by
allowing them to specify a general prefix on global / exporter / play
level

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will decrease the amount of redundant configuration for users by
allowing them to specify a general prefix on global / exporter / play
level

Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for hook functionality and lineinfile parameters</title>
<updated>2023-06-03T18:35:14+00:00</updated>
<author>
<name>Colin Wilk</name>
<email>colin.wilk@tum.de</email>
</author>
<published>2023-06-03T18:35:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.wilk.cx/ansible/ansible-role-prometheus-target.git/commit/?id=7ebb8e16cf9b37898cd167c8e523c7e10fb6891a'/>
<id>7ebb8e16cf9b37898cd167c8e523c7e10fb6891a</id>
<content type='text'>
Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Colin Wilk &lt;colin.wilk@tum.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
