Icinga / Icinga/icinga-powershell-framework
Avoid dropping to interactive prompt in Install-Icinga command
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 87
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Problem
When running the Install-Icinga Command, incorrect values for (or mandatory but missing) parameters drop you to an interactive menu.
For manual installations this is perfect since you can simply correct your errors in the wizard.
If however you are trying an automatic approach, you might lock the session (PowerShell) indefinetely.
Using Ansible I basically create an InstallCommand from a template. If the user or Ansible does something wrong, the Ansible task never finishes and just idles for ever (because we got dropped to the interactive prompt without any way to leave).
The only measure against this is a timeout (which might kill "good" processes that just happen to take longer than timeout).
Desired change
I would like to have a parameter like -NoInteractive that would cause the command to simply exit with failure instead of dropping into the interactive menu (in case of errors of course).
If -NoInteractive is not given, the old behaviour should be kept. This way, both approaches have a reliable workflow.
If automation fails, it's almost certainly user error. Thus failing early (before timeout) saves time in the long run.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/core/installer/Install-Icinga.psm1, especially the Install-Icinga command entry point and its parameter handling. Trace how incorrect or missing parameters reach the interactive menu; done means a -NoInteractive option fails instead, while the existing interactive behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100