You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
When including this role in a playbook running in check mode without the role having run against this host before, the step "Ensure blackbox exporter binary has cap_net_raw capability" fails, as /usr/local/bin/blackbox_exporter does not yet exist.
fatal: [hostname.mydomain.com]: FAILED! => {"changed": false, "msg": "Unable to get capabilities of /usr/local/bin/blackbox_exporter", "stderr": "/usr/local/bin/blackbox_exporter (No such file or directory)\n", "stderr_lines": ["/usr/local/bin/blackbox_exporter (No such file or directory)"], "stdout": "", "stdout_lines": []}
Did you expect to see some different?
I would expect to be able to get through a check mode without this role causing to to fail. I think a skipped and possibly a debug message indicating that this step isn't checked due to the possibility of failure would be acceptable.
How to reproduce it (as minimally and precisely as possible):
Targeting a host against which this role has not been applied, include this role in a playbook and run ansible-playbook in check mode (--check).
Environment
Role version:
0.9.2
Ansible version information:
Collecting ansible==2.9.9
Variables:
N/A
Ansible playbook execution Logs:
TASK [cloudalchemy.blackbox-exporter : Ensure blackbox exporter binary has cap_net_raw capability] ***
fatal: [hostname.mydomain.com]: FAILED! => {"changed": false, "msg": "Unable to get capabilities of /usr/local/bin/blackbox_exporter", "stderr": "/usr/local/bin/blackbox_exporter (No such file or directory)\n", "stderr_lines": ["/usr/local/bin/blackbox_exporter (No such file or directory)"], "stdout": "", "stdout_lines": []}
Anything else we need to know?:
I think that including when: not ansible_check_mode on this tasks (along with a warning message when: ansible_check_mode) would be a good fix for this. I will submit a PR to fix.
The text was updated successfully, but these errors were encountered:
What happened?
When including this role in a playbook running in check mode without the role having run against this host before, the step "Ensure blackbox exporter binary has cap_net_raw capability" fails, as
/usr/local/bin/blackbox_exporter
does not yet exist.Did you expect to see some different?
I would expect to be able to get through a check mode without this role causing to to fail. I think a
skipped
and possibly a debug message indicating that this step isn't checked due to the possibility of failure would be acceptable.How to reproduce it (as minimally and precisely as possible):
Targeting a host against which this role has not been applied, include this role in a playbook and run
ansible-playbook
in check mode (--check
).Environment
Role version:
0.9.2
Ansible version information:
Collecting ansible==2.9.9
Variables:
N/A
Anything else we need to know?:
I think that including
when: not ansible_check_mode
on this tasks (along with a warning messagewhen: ansible_check_mode
) would be a good fix for this. I will submit a PR to fix.The text was updated successfully, but these errors were encountered: