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

Configuration reference: provider options environment example missing binary #1458

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

NitrogenUA
Copy link
Contributor

@NitrogenUA NitrogenUA commented Nov 3, 2022

Lexicon binary is missing in the "Passing provider options to Lexicon" environment variable example.

While we're at it, I couldn't get --config-dir to work in the trailing position as given in "provider options" -> "configuration file" example. Usage message for lexicon suggests that optional parameters should go first followed by the actual DNS manipulation command. Otherwise argument processing seems to break in my experience. However I have not looked through the code to confirm this beyond doubt. Should we move it forward like so?
lexicon --config-dir /path/to/config cloudflare create domain.net TXT --name foo --content bar
It might appear as a minor thing, but it did cost me additional headbashing in conjuction with the typo from #1431 since I had BOTH parameter placement in lexicon invocation AND yml-configuration wrong! 😕
Hopefully this suggested change can save some time for other users.

@adferrand
Copy link
Collaborator

Thanks for the fix.

Indeed there is something not obvious regarding --config-file. The thing that there are two args parsing level. The first one is related to general options to Lexicon, including the actual provider. Then based on the selected provider, the options related to the provider itself are parsed. So effectively, options related to Lexicon should come first, ending with the provider name, then comes the DNS action + the provider options.

You're example lexicon --config-dir /path/to/config cloudflare create domain.net TXT --name foo --content bar is the right one.

I have in my backlog a redesign of the argument parsing system to avoid this limitation and permit to pass the arguments in any order.

@adferrand
Copy link
Collaborator

I fix the documentation regarding options as a follow-up to your PR.

@adferrand adferrand merged commit 942f8f8 into AnalogJ:master Feb 3, 2023
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.

2 participants