successful windows ansible run

This commit is contained in:
2025-10-26 03:40:12 -07:00
parent 7bcd51bdd4
commit 04373ff604
5 changed files with 47 additions and 14 deletions

View File

@ -1,15 +1,12 @@
---
tasks:
- name: Show some information
become: true
ansible.windows.win_command: |
hostname
whoami
gpresult /v | find "DC=cosmos"
- name: Check hostname
ansible.windows.win_command: hostname
register: hostname_output
- name: display hostname
debug:
msg: "Hostname: {{ hostname_output.stdout_lines[0] }}"
...