-
Notifications
You must be signed in to change notification settings - Fork 237
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
Nornir write_file util not printing properly #620
Comments
Sorry, to be more precise, task.is_dry_run(dry_run) currently evaluates to True. |
So you are saying task.is_dry_run(None) will evaluate to True?
Regards,
Kirk
…On Sat, Dec 19, 2020 at 4:53 AM hans-vvv ***@***.***> wrote:
Sorry, to be more precise,
task.is_dry_run(dry_run) currently evaluates to True.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#620 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG3VBALYOSIECPEQSQDSZDSVSO3RANCNFSM4VCIUTRQ>
.
--
*Kirk Byers*
*ktbyers@twb-tech.com <ktbyers@twb-tech.com>*
*Simplify through Automation*
|
Looking at the Nornir core code, if you don't pass any argument in then it
looks like it uses self.global_dry_run which I assume will default to False
(unless you are setting it somehow). Definite assumptions that I am making,
however, as I only traced the source code so far.
Kirk
…On Tue, Dec 22, 2020 at 9:43 AM Kirk Byers ***@***.***> wrote:
So you are saying task.is_dry_run(None) will evaluate to True?
Regards,
Kirk
On Sat, Dec 19, 2020 at 4:53 AM hans-vvv ***@***.***> wrote:
> Sorry, to be more precise,
>
> task.is_dry_run(dry_run) currently evaluates to True.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#620 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAG3VBALYOSIECPEQSQDSZDSVSO3RANCNFSM4VCIUTRQ>
> .
>
--
*Kirk Byers*
***@***.*** ***@***.***>*
*Simplify through Automation*
--
*Kirk Byers*
*ktbyers@twb-tech.com <ktbyers@twb-tech.com>*
*Simplify through Automation*
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
This is my first contribution on Github ever. Hopefully I didn't miss anything ;)
The write_file Nornir utility is not printing anything if default dry_run kwarg is not used when calling the function. In line 35 "None" is used as default, this evaluates in line 53 to "True". Changing line 35 to False resolves this issue.
Regards,
Hans
https://github.com/nornir-automation/nornir_utils/blob/master/nornir_utils/plugins/tasks/files/write_file.py
The text was updated successfully, but these errors were encountered: