Skip to content
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

Fixes #70 Role fails to run in check mode. #71

Closed
wants to merge 1 commit into from

Conversation

sgf-dma
Copy link
Contributor

@sgf-dma sgf-dma commented Mar 5, 2021

Hi.

This is the fix for check mode.

I can't make fix suggested by @Qwiz in #70 (add check_mode: no to Obtain pdns version string task) working, because version detection relies on the fact, that pdns_recursor is indeed installed. But when run in check mode, this may not be the case. Moreover, using 'shell' in Obtain pdns version string task hides this fact, because pipeline always has return code of last command (which is awk) and awk will never fail here. But that's (probably) another problem.

So, i've just added default value of 0 for _pdns_rec_version, which may not show accurate results in some cases (when we need to modify systemd override file), but at least make check mode run till the end.

Set '_pdns_rec_version' by default to 0 to avoid variable undefined
errors during check mode.
@pieterlexis pieterlexis mentioned this pull request Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant