Files
ansible/windows_ping.yml
2024-07-12 12:58:40 +02:00

29 lines
684 B
YAML

---
- name: run automation for windows
gather_facts: no
hosts: all
become_method: runas
tasks:
- name: test connection for adagility
block:
- name: test connection
wait_for_connection:
timeout: 5
- name: debug aperamnet
debug:
var: useraperamnet
rescue:
- name: change credentials
# set_fact:
# ansible_user: "{{useraperamnet}}"
# ansible_password: "{{passaperamnet}}"
environment:
ansible_user: "{{useraperamnet}}"
ansible_password: "{{passaperamnet}}"
- name: test connection for aperamnet
wait_for_connection:
timeout: 20