ansible.windows.win_owner – Set owner

From Get docs
Ansible/docs/2.10/collections/ansible/windows/win owner module


ansible.windows.win_owner – Set owner

Note

This plugin is part of the ansible.windows collection (version 1.3.0).

To install it use: ansible-galaxy collection install ansible.windows.

To use it in a playbook, specify: ansible.windows.win_owner.


Synopsis

  • Set owner of files or directories.

Parameters

Parameter Choices/Defaults Comments

path

path / required

Path to be used for changing owner.

recurse

boolean

  • no

  • yes

Indicates if the owner should be changed recursively.

user

string / required

Name to be used for changing owner.



See Also

See also

ansible.windows.win_acl
The official documentation on the ansible.windows.win_acl module.
ansible.windows.win_file
The official documentation on the ansible.windows.win_file module.
ansible.windows.win_stat
The official documentation on the ansible.windows.win_stat module.


Examples

- name: Change owner of path
  ansible.windows.win_owner:
    path: C:\apache
    user: apache
    recurse: yes

- name: Set the owner of root directory
  ansible.windows.win_owner:
    path: C:\apache
    user: SYSTEM
    recurse: no

Authors

  • Hans-Joachim Kliemeck (@h0nIg)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/windows/win_owner_module.html