ansible-gitea-management/adhoc-team-mod-members.yml

29 lines
1.0 KiB
YAML
Raw Normal View History

2022-03-28 00:53:47 +00:00
---
# This playbook is meant to be used with callable variables, like adhoc or AWX.
2024-12-21 21:01:14 +00:00
# What: Modifies a team in a Gitea Organization, relying on the forgejo collection
2022-03-28 00:53:47 +00:00
# What is expected:
2024-12-21 21:01:14 +00:00
# -> 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
2022-03-28 00:53:47 +00:00
- 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"
2024-12-21 21:01:14 +00:00
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 }}"
2022-03-28 00:53:47 +00:00
...