mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
* Windows: Add special parameter types Adding explicit parameter types now exposes this information in the module documentation, and proves really helpful. We only do this for non-string types as strings, mostly because strings are implicit. PS We also make copyright statements consistent and use #Requires for explicit library imports * Type "string" must be type "str" * A few more Copyright corrections * More fixes * Don't add file encoding to Powershell files * Don't add missing interfacetypes parameter Otherwise CI demands an incorrect version_added * Small fix
53 lines
1.1 KiB
Python
53 lines
1.1 KiB
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de>
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|
'status': ['preview'],
|
|
'supported_by': 'core'}
|
|
|
|
DOCUMENTATION = r'''
|
|
---
|
|
module: win_owner
|
|
version_added: "2.1"
|
|
short_description: Set owner
|
|
description:
|
|
- Set owner of files or directories
|
|
options:
|
|
path:
|
|
description:
|
|
- Path to be used for changing owner
|
|
required: yes
|
|
type: path
|
|
user:
|
|
description:
|
|
- Name to be used for changing owner
|
|
required: yes
|
|
recurse:
|
|
description:
|
|
- Indicates if the owner should be changed recursively
|
|
type: bool
|
|
default: 'no'
|
|
author:
|
|
- Hans-Joachim Kliemeck (@h0nIg)
|
|
'''
|
|
|
|
EXAMPLES = r'''
|
|
- 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
|
|
'''
|
|
|
|
RETURN = r'''
|
|
|
|
'''
|