10 lines
309 B
YAML
10 lines
309 B
YAML
---
|
|
- name: win_powershell_exec
|
|
hosts: all
|
|
tasks:
|
|
- name: check DNS
|
|
win_shell: |
|
|
Get-DnsClientServerAddress -InterfaceIndex (Get-NetAdapter|where Status -eq "Up").ifindex -ErrorAction SilentlyContinue
|
|
register: command_output
|
|
- name: command output
|
|
ansible.builtin.debug: |