successful windows ansible run

This commit is contained in:
matt committed 2025-10-26 03:40:12 -07:00
1 parent 7bcd51bdd4
commit 04373ff604
5 files changed
+47 -14

No files matched your search

+7 -10
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] }}"
...