Skip to content

Avoid dropping to interactive prompt in Install-Icinga command #832

@Donien

Description

@Donien

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions