ansible.windows.win_owner (2.3.0) — module

Set owner

Authors: Hans-Joachim Kliemeck (@h0nIg)

Install collection

Install with ansible-galaxy collection install ansible.windows:==2.3.0


Add to requirements.yml

  collections:
    - name: ansible.windows
      version: 2.3.0

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
  ansible.windows.win_owner:
    path: C:\apache
    user: apache
    recurse: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the owner of root directory
  ansible.windows.win_owner:
    path: C:\apache
    user: SYSTEM
    recurse: false

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