Добавить test-playbooks/win_dns_ps.yml
This commit is contained in:
10
test-playbooks/win_dns_ps.yml
Normal file
10
test-playbooks/win_dns_ps.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: win_powershell_exec
|
||||
hosts: windows_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:
|
||||
Reference in New Issue
Block a user