20 lines
386 B
YAML
20 lines
386 B
YAML
---
|
|
- name: Test Windows connection
|
|
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: Get hostname
|
|
win_command: hostname
|
|
register: result
|
|
|
|
- debug:
|
|
var: result.stdout |