-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add support for specifying -4 option to nsupdate #42
Conversation
@mijaros can I get your thoughts on this? |
@accorvin this is certainly a good idea and thank you for the contribution, we might add a |
@mijaros that makes sense to me. I can work on updating this PR to do that. |
@accorvin if you can I'd be grateful. Thank you. Line 71 in 647a226
with 'action': 'store_true' and rename the __init__ argument in NSUpdate class to the same name (without the dns_ prefix), so in the situation above it would be use_ipv4=False for argument dns_use_ipv4 .
|
@mijaros Updated. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blimey, store_true
won't work together with dynaconf in the current setup. The problem is that the store_true
action always defaults to false. The way how the overriding from command line now works with osia is, that if the key in command line arguments is not None
it means we're overriding anything that's in the settings.yaml
. Since store_true
always keeps the key in the arguments, it basically overrides all the time. I've found a potential workaround, to use store_const
(see suggested change) with the value of True
. This will mean, that if the option is not passed it will have a value of None
and if it is passed, it will have the value of True
. Hence it can be stored in the settings.yaml
as well as overridden from the command line if needed.
@accorvin ok it seems that now it's only the linter complaining, could I ask you to rearrange the code (it will only be necessary to add a line and align it in cli.py). Then you can run the following command
and it should be clean. |
In our environment, our DNS server requires passing the "-4" argument to the nsupdate command. This change adds support for configuring OSIA to use this option when using the nsupdate dns provider.
8243000
to
911e62b
Compare
@mijaros done |
I've tried it, and the option works as well as the configuration in settings.yaml. Going to merge now, and then release. |
Awesome! Thanks for the quick turnaround @mijaros! |
Bumped into this flag "--dns-use-ipv4" when trying to provision from my local RHEL8 then realized Thinking if it is a good idea to add check logic in the script, say, when user uses this flag, it still checks to see if installed |
In our environment, our DNS server requires passing the "-4" argument to
the nsupdate command. This change adds support for configuring OSIA to
use this option when using the nsupdate dns provider.