documentation

This commit is contained in:
chris 2020-08-09 22:38:25 +02:00
parent f72e3066b9
commit 30b9b2ae53
1 changed files with 117 additions and 0 deletions

View File

@ -8,12 +8,129 @@ ANSIBLE_METADATA = {
DOCUMENTATION = '''
---
module: gitea_repository
short_description: Manage Gitea repositories
description:
- "Manage repositories (and deployment keys) in Gitea"
options:
state:
description:
- The desired state of the repository.
choices: ['present', 'absent']
default: present
required: no
name:
description:
- The name for your repository.
required: true
private:
description:
- Wether the repository is publically accessible
choices: ['yes', 'no']
default: yes
required: false
organization:
description:
- The organization account the repository belongs to.
One of organization and user must be set.
Only one of organization and user must be set.
required: false
user:
description:
- The user account the repository belongs to.
One of organization and user must be set.
Only one of organization and user must be set.
required: false
auto_init:
description:
- Wether to initialize the repository with default files.
Can only be given on creation.
required: false
choices: ['yes', 'no']
description:
description:
- The repositories description.
required: false
gitignores:
description:
- .gitignore file for the repository.
Can only be given on creation.
required: false
issue_labels:
description:
- Issue labels for the repository.
Can only be given on creation.
required: false
license:
description:
- license file for the repository.
Can only be given on creation.
required: false
readme:
description:
- README (in Markdown) for the repository.
Can only be given on creation.
required: false
deploy_key:
description:
- SSH deployment key that is to be set up for the repository
suboptions:
state:
description:
- The desired state of the deploy key.
choices: ['present', 'absent']
default: present
required: false
key:
description:
- The public key in SSH format (e.g. "ssh-rsa 12345....12345 identifier")
required: true
read_only:
description:
- Wether the deploy key should have read-only access to the repository.
choices: ['yes', 'no']
default: yes
title:
description:
- A title for identification of the supplied key
required: false
required: false
auth_token:
description:
- Authentification token for your gitea account
required: true
gitea_url:
description:
- Base URL of your gitea API instance (e.g. "https://git.zknt.org")
required: true
author:
- Chris Gebhardt <cg@zknt.org> (@hnrd)
'''
EXAMPLES = '''
gitea_repository:
auth_token: 1234...6789
gitea_url: https://git.example.com
name: 'testrepo'
organization: test123
state: present
deploy_key:
key: ssh-ed25519 AAAA...1234 jenkins
title: CI key
read_only: False
'''
RETURN = '''
return_code:
description: The HTTP return code from the Gitea API
type: int
returned: always
gitea_respone:
description: The JSON output message that Gitea returns
type: dict
'''
from ansible.module_utils.basic import AnsibleModule