-
Notifications
You must be signed in to change notification settings - Fork 152
[prometheus.prometheus.prometheus : Copy custom alerting rule files] step is failing #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What does your |
This is what I have: |
My ansible and collections versions: ❯ ansible --version
ansible [core 2.16.12]
config file = /home/arnaud/.ansible.cfg
configured module search path = ['/home/arnaud/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/arnaud/.virtualenvs/invoke/lib64/python3.12/site-packages/ansible
ansible collection location = /home/arnaud/.ansible/collections:/usr/share/ansible/collections
executable location = /home/arnaud/.virtualenvs/invoke/bin/ansible
python version = 3.12.7 (main, Oct 1 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] (/home/arnaud/.virtualenvs/invoke/bin/python)
jinja version = 3.1.4
libyaml = True
❯ ansible-galaxy collection list
# /home/arnaud/.ansible/collections/ansible_collections
Collection Version
---------------------------------------- -------
ansible.posix 1.6.2
community.crypto 2.22.3
community.docker 4.0.0
community.general 9.5.0
community.grafana 2.1.0
community.hashi_vault 6.2.0
community.library_inventory_filtering_v1 1.0.0
community.vmware 5.0.1
containers.podman 1.15.4
prometheus.prometheus 0.21.0
vmware.vmware 1.6.0 |
Can you show me exactly how the variable is configured? Wondering if it's perhaps configured as a string and not as a list. |
It is declared as a string yes, which was previously working. |
I confirm that it works with a list. I think that there should be a check on the type of the variable if it now change the behaviour so wildly if the type is not the one expected. |
That should actually be happening, the variable is defined as a list in the argument specs ( |
Hello,
Since I updated to the latest available version (0.21.0) I am not able to copy the custom alerting rules to the Prometheus host, as it is looking in the wrong directory and thus tries to validate non rules files using promtools.
The change from using
with_fileglob: "{{ prometheus_alert_rules_files }}"
toloop: "{{ prometheus_alert_rules_files | map('ansible.builtin.fileglob') | flatten }}"
in roles/prometheus/tasks/configure.yml (1e4e4c3) is the root cause of this, I put back thewith_fileglob
in place of theloop
and it is working fine again.The text was updated successfully, but these errors were encountered: