31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
---
|
|
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
|
# What: Creates an organization/group in Gitea, relying on the gitea collection
|
|
# What is expected (at a minimum):
|
|
# -> gitea_api_user + gitea_api_password *OR* gitea_api_token
|
|
# -> gitea_org_name
|
|
# -> gitea_org_owner, optional (defaults to token or api user if not set)
|
|
- name: Create Gitea Organization or Group
|
|
hosts: all
|
|
become: false
|
|
vars_files:
|
|
- "vars/common.yml"
|
|
|
|
# Create org
|
|
# Optionally assign user as part of owner team
|
|
# Remove automated account
|
|
tasks:
|
|
- name: "Create organization"
|
|
lazyutilitynet.ansible_gitea.gitea_org:
|
|
api_url: "https://{{ gitea_basename }}"
|
|
api_username: "{{ gitea_api_user|default(omit) }}"
|
|
api_password: "{{ gitea_api_password|default(omit) }}"
|
|
api_token: "{{ gitea_api_token|default(omit) }}"
|
|
state: "{{ gitea_org_state|default('present') }}"
|
|
org_name: "{{ gitea_org_name }}"
|
|
location: "{{ gitea_org_location|default(omit) }}"
|
|
full_name: "{{ gitea_org_full_name|default(omit) }}"
|
|
owner: "{{ gitea_org_owner|default(omit) }}"
|
|
description: "{{ gitea_org_desc|default(omit) }}"
|
|
...
|