Skip to content

Running from Ansible AP #68

@thesutex

Description

@thesutex

Does this PSmodule not support running headless via Ansible? I have no problem searching for updates via Ansible playbooks, or even installing certain updates as .net. But as soon as i install bigger cumulative updates (requiring reboots) the play fails due to script running interactivly.

error from ansible:
A command that prompts the user failed because the host program or the
command type does not support user interaction. Try a host program that
supports user interaction, such as the Windows PowerShell Console or
Windows PowerShell ISE, and remove prompt-related commands from command
types that do not support user interaction, such as Windows PowerShell
workflows.

play basicly runs:

    $categories = @('Critical Updates', 'Security Updates')
    $installResult = Install-WindowsUpdate `
      -AcceptAll `
      -IgnoreUserInput `
      -IgnoreRebootRequired `
      -IgnoreReboot `
      -Category $categories `
      -NotCategory @('Drivers', 'FeaturePacks') `
      -AutoReboot:$false `
      -Confirm:$false `
      -Verbose

Ansible runs this local on server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions