We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear Glenn, May I know how to write a playbook to shutdown hyper-v cluster guest? powershell script:
$a = Get-ClusterGroup | Where-Object {$.Name -like "server1" -and $.State -eq 'Online'} $b = $a.OwnerNode Stop-VM -Name "vm1" -ComputerName $b
I try to write the playbook but get error.
name: Hyper-V shutdown VM hosts: all gather_facts: no tasks: win_shell: | $a = Get-ClusterGroup | Where-Object {$.Name -like "{{ vm }}" -and $.State -eq 'Online'} $b = $a.OwnerNode Stop-VM -Name "{{ vm }}" -ComputerName $b
name: Hyper-V shutdown VM hosts: all gather_facts: no
tasks:
In job template extra variable: vm: vmgest1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dear Glenn,
May I know how to write a playbook to shutdown hyper-v cluster guest?
powershell script:
I try to write the playbook but get error.
In job template extra variable:
vm: vmgest1
The text was updated successfully, but these errors were encountered: