Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Only run capabilities module in apply mode. #73

Merged
merged 1 commit into from
Sep 29, 2020
Merged

Only run capabilities module in apply mode. #73

merged 1 commit into from
Sep 29, 2020

Conversation

seancallaway
Copy link
Contributor

Running this module in check mode can cause a fatal error, as the file (normally installed by the role earlier) may not exist. Also, add a debug message indicating why this was skipped.

This resolves #72. Instead of the fatal error noted there, the following output is produced and execution continues:

TASK [blackbox-exporter : Ensure blackbox exporter binary has cap_net_raw capability] **************************************
skipping: [hostname.mydomain.com]

TASK [blackbox-exporter : Check Debug Message] *****************************************************************************
ok: [hostname.mydomain.com] => {
    "msg": "The capabilities module is skipped during check mode, as the file may not exist, causing execution to fail."
}

Running this module in check mode can cause a fatal error, as the file (normally installed by the
role earlier) may not exist. Also, add a debug message indicating why this was skipped.
@github-actions github-actions bot added the area/tasks Logic behind ansible role label Sep 28, 2020
@paulfantom
Copy link
Member

Thanks! 👍

@paulfantom paulfantom merged commit 93fad2e into cloudalchemy:master Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/tasks Logic behind ansible role
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Role Fails When Running Initially in Check Mode
2 participants