Files
semaphore/test-playbooks/win_dns_ps.yml

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: