ansible-gitea-management/adhoc-team-mod-members.yml
2022-03-27 17:53:47 -07:00

29 lines
1021 B
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 gitea collection
# What is expected:
# -> gitea_api_user + gitea_api_password *OR* gitea_api_token
# -> gitea_org_name
# -> gitea_team_name
# -> gitea_team_members (in the form of a list)
# -> gitea_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_gitea.gitea_team:
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) }}"
org_name: "{{ gitea_org_name }}"
name: "{{ gitea_team_name }}"
members: "{{ gitea_team_members }}"
member_action: "{{ gitea_team_action }}"
...