29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
---
|
|
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
|
# What: Modifies a team in a Gitea Organization, relying on the forgejo collection
|
|
# What is expected:
|
|
# -> forgejo_api_user + forgejo_api_password *OR* forgejo_api_token
|
|
# -> forgejo_org_name
|
|
# -> forgejo_team_name
|
|
# -> forgejo_team_members (in the form of a list)
|
|
# -> forgejo_team_action, add or remove
|
|
- name: Create Gitea Team in an Organization or Group
|
|
hosts: all
|
|
become: false
|
|
vars_files:
|
|
- "vars/common.yml"
|
|
|
|
# Create team
|
|
tasks:
|
|
- name: "Create team and Add Users"
|
|
lazyutilitynet.ansible_forgejo.forgejo_team:
|
|
api_url: "https://{{ forgejo_basename }}"
|
|
api_username: "{{ forgejo_api_user|default(omit) }}"
|
|
api_password: "{{ forgejo_api_password|default(omit) }}"
|
|
api_token: "{{ forgejo_api_token|default(omit) }}"
|
|
org_name: "{{ forgejo_org_name }}"
|
|
name: "{{ forgejo_team_name }}"
|
|
members: "{{ forgejo_team_members }}"
|
|
member_action: "{{ forgejo_team_action }}"
|
|
...
|