successful windows ansible run
This commit is contained in:
@ -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] }}"
|
||||
|
||||
...
|
||||
Reference in New Issue
Block a user