ansible.builtin.win_owner (v2.9.27) — module

Set owner

| "added in version" 2.1 of ansible.builtin"

Authors: Hans-Joachim Kliemeck (@h0nIg)

preview | supported by core

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Set owner of files or directories.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Change owner of path
  win_owner:
    path: C:\apache
    user: apache
    recurse: yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the owner of root directory
  win_owner:
    path: C:\apache
    user: SYSTEM
    recurse: no

Inputs

    
path:
    description:
    - Path to be used for changing owner.
    required: true
    type: path

user:
    description:
    - Name to be used for changing owner.
    required: true
    type: str

recurse:
    default: false
    description:
    - Indicates if the owner should be changed recursively.
    type: bool

See also