ansible.windows.win_owner module – Set owner
This module is part of the ansible.windows collection (version 2.1.0).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install ansible.windows.
To use it in a playbook, specify:
Set owner of files or directories.
Path to be used for changing owner.
Indicates if the owner should be changed recursively.
Name to be used for changing owner.
- name: Change owner of path ansible.windows.win_owner: path: C:\apache user: apache recurse: true - name: Set the owner of root directory ansible.windows.win_owner: path: C:\apache user: SYSTEM recurse: false