first commit
This commit is contained in:
21
windows_facts.yml
Normal file
21
windows_facts.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- name: get facts
|
||||
become: true
|
||||
become_method: runas
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
# - name: run the setup facts
|
||||
# ansible.builtin.setup:
|
||||
- name: try command
|
||||
ansible.windows.win_command: powershell.exe -
|
||||
args:
|
||||
stdin: Get-DnsClientServerAddress | select ServerAddresses -First 1
|
||||
register: command_out
|
||||
ignore_errors: true
|
||||
|
||||
- name: show dns configs
|
||||
debug:
|
||||
var: command_out.stdout
|
||||
|
||||
Reference in New Issue
Block a user