tasks:
- name: Get builtin admin user
win_shell: (get-localuser |? {$_.sid -match '-500$'}).name
register: admin
- name: First
ansible.windows.win_user:
name: "{{ admin.stdout | regex_replace('[\\r\\n\\t]+','') }}"
state: query
register: user
--- - hosts: all gather_facts: no tasks: - name: stat module help to find the file info stat: path: /var/run register: your_variable # for your reference, check the outputs of these - debug: var=your_variable.stat # your code goes here... - shell: echo "{{your_variable.stat}}" > /tmp/by_ansible
Обсуждают сегодня