jumpserver/apps/accounts/automations/gather_accounts/host/windows/main.yml
fit2bot 503034299e
fix: windows 收集账号 收集失败 (#12583)
Co-authored-by: feng <1304903146@qq.com>
2024-01-23 11:07:56 +08:00

14 lines
310 B
YAML

- hosts: demo
gather_facts: no
tasks:
- name: Gather windows account
ansible.builtin.win_shell: net user
register: result
ignore_errors: true
- name: Define info by set_fact
ansible.builtin.set_fact:
info: "{{ result.stdout_lines }}"
- debug:
var: info