aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Add Troubleshooting information to READMEv1.2.0Colin Wilk2023-10-112-0/+86
| | | | | | | This added information about the possible ssh-server overloading and run_once locking issues. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add run_once option for handlersColin Wilk2023-10-1110-14/+81
| | | | | | | | | | | | | | 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 <colin.wilk@tum.de>
* Ignore MDLint rule that conflicts with Changelog formatColin Wilk2023-10-112-0/+3
| | | | | | | `MD024 Multiple headers with the same content` Conflicts with using same sub-headers for the keepachangelog format Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ChangelogColin Wilk2023-06-151-0/+8
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ability to use exporter without id propertyv1.1.0Colin Wilk2023-06-155-6/+19
| | | | | | | | | | | | | | | | | 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 <colin.wilk@tum.de>
* Remove multiline string indentation check for yamllintColin Wilk2023-06-151-1/+1
| | | | | | | Removing this so that multiline strings (and jinja code especially) can be formatted in a more readable way. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ability to specify target path prefixColin Wilk2023-06-116-5/+137
| | | | | | | | 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 <colin.wilk@tum.de>
* Add readme example for group_var matchingColin Wilk2023-06-041-0/+53
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Remove fedora:39 from workflowColin Wilk2023-06-041-1/+0
| | | | | | | Removing it since the dnf seems to be broken in the current :39 releases and the other releases should test fedora enough. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add tests for hook functionality and lineinfile parametersColin Wilk2023-06-032-22/+130
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Fix collection typo in READMEColin Wilk2023-06-011-2/+2
| | | | | | | Fix typo in ansible-galaxy command which tries to install a collection from the role repository. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Split github pre-commit into own workflowColin Wilk2023-06-012-8/+12
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Link to defaults file on reference in readmeColin Wilk2023-05-311-1/+1
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add more tags for ansible galaxyv1.0.1Colin Wilk2023-05-301-0/+6
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add github workflow to create ansible-galaxy releases on tag pushesv1.0.0Colin Wilk2023-05-301-0/+34
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ability to configure default exportersColin Wilk2023-05-302-3/+4
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Rewrite if defined to default condition in lineinfileColin Wilk2023-05-301-2/+2
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add become_user and become_method config variables to handlersColin Wilk2023-05-303-2/+14
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add alpine, rockylinux and fedora to testing pipelineColin Wilk2023-05-293-7/+51
| | | | | | Add more distros to CI/CD and include them in the galaxy meta file. Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ReadmeColin Wilk2023-05-291-0/+220
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add github actions pipelineColin Wilk2023-05-291-0/+80
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Switch to 4 space indentation by default for lineinfile strategyColin Wilk2023-05-292-5/+5
| | | | | | | | | | | | | | | | | | This will change indentation in target files like: - labels: exporter: node targets: - host:9100 to - labels: exporter: node targets: - host:9100 Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add documentation for defaultsColin Wilk2023-05-271-6/+77
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add argument_specs.ymlColin Wilk2023-05-271-0/+87
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Make prometheus_target_host a required variableColin Wilk2023-05-272-1/+2
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add molecule with some simple test casesColin Wilk2023-05-275-0/+111
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Switch to single host per exporter configurationColin Wilk2023-05-272-6/+7
| | | | | | | | | | | | | | | | | Before you could do multiple hosts per exporter like this: - id: node_exporter hosts: - host1 - host2 This was removed since it simplifies the code quite a bit and you can still archive the same behavior like this: - { id: node_exporter, host: host1 } - { id: node_exporter, host: host2 } Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Move hook ansible module config into their own config objectColin Wilk2023-05-262-33/+34
| | | | | | | | | | | | Keep * prometheus_target_handler_command_enabled * prometheus_target_handler_command_become * prometheus_target_handler_shell_enabled * prometheus_target_handler_shell_become to avoid being overwritten when specifying prometheus_target_handler_command or prometheus_target_handler_shell Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* Add ansible galaxy meta fileColin Wilk2023-05-261-0/+19
| | | | Signed-off-by: Colin Wilk <colin.wilk@tum.de>
* initColin Wilk2023-05-268-0/+277
Signed-off-by: Colin Wilk <colin.wilk@tum.de>