W3cubDocs

/Ansible

win_owner - Set owner

New in version 2.1.

Synopsis

Set owner of files or directories

Options

parameter required default choices comments
path
yes
Path to be used for changing owner
recurse
no
  • False
  • True
Indicates if the owner should be changed recursively
user
yes
Name to be used for changing owner

Examples

# Playbook example
---
- name: Change owner of Path
  win_owner:
    path: 'C:\apache\'
    user: apache
    recurse: yes

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

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

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