diff --git a/test-playbooks/win_dns_ps.yml b/test-playbooks/win_dns_ps.yml index 9249aae..d182f4a 100644 --- a/test-playbooks/win_dns_ps.yml +++ b/test-playbooks/win_dns_ps.yml @@ -1,20 +1,15 @@ --- -- name: Test Windows connection +- name: Check Windows DNS settings hosts: all gather_facts: no - vars: - ansible_connection: winrm - ansible_port: 5985 - ansible_winrm_scheme: http # явно указываем HTTP - tasks: - - name: Test WinRM ping - win_ping: + - name: Check DNS servers + ansible.windows.win_shell: | + Get-DnsClientServerAddress -AddressFamily IPv4 | + Select-Object InterfaceAlias, ServerAddresses + register: dns_result - - name: Get hostname - win_command: hostname - register: result - - - debug: - var: result.stdout \ No newline at end of file + - name: Display DNS settings + debug: + msg: "{{ dns_result.stdout }}" \ No newline at end of file