Skip to content

Commit

Permalink
Add support to configure cron schedule for goss tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timeu committed Jul 26, 2022
1 parent 6a6cb0f commit 4b37220
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: clip
name: hpc

# The version of the collection. Must be compatible with semantic versioning
version: 1.2.0
version: 1.3.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
2 changes: 1 addition & 1 deletion roles/goss/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ goss_test_file: "dummy.yml"
goss_template_vars: ""
goss_template_vars_file: "goss_vars.yml"
goss_node_exporter_textfile_dir: "/tmp"

goss_cron_schedule: "*/1 * * * *"

# defaults file for role-goss
3 changes: 3 additions & 0 deletions roles/goss/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
state: installed

- name: deploy /etc/cron.d/prometheus_goss file
tags:
- always
- goss_reconfigure
template:
src: "templates/prometheus_goss.cron.j2"
dest: "/etc/cron.d/prometheus_goss"
Expand Down
2 changes: 1 addition & 1 deletion roles/goss/templates/prometheus_goss.cron.j2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*/1 * * * * root {{ goss_install_dir }}/prometheus_goss.sh
{{ goss_cron_schedule }} root {{ goss_install_dir }}/prometheus_goss.sh

0 comments on commit 4b37220

Please sign in to comment.