--- # This playbook is meant to be used with callable variables, like adhoc or AWX. # What: Creates a repo for a Gitea Organization or User # What is expected (at a minimum): # -> forgejo_api_user + forgejo_api_password *OR* forgejo_api_token # -> forgejo_repo_name # -> forgejo_repo_owner # -> forgejo_repo_state # Optional items: # -> forgejo_repo_desc # -> forgejo_repo_private # -> forgejo_auto_init # -> forgejo_default_branch # -> forgejo_repo_license # -> forgejo_allow_merge_commits # -> forgejo_allow_rebase # -> forgejo_allow_rebase_explicit # -> forgejo_allow_squash_merge # -> forgejo_repo_archived # -> forgejo_ignore_whitespace_conflicts # -> forgejo_has_issues # -> forgejo_has_wiki # -> forgejo_has_pull_requests # -> forgejo_repo_website - name: Create Gitea Repo for a User or Org hosts: all become: false vars_files: - "vars/common.yml" # Create repo tasks: - name: "Create Repository" lazyutilitynet.ansible_forgejo.forgejo_repo: 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) }}" state: "{{ forgejo_repo_state|default('present') }}" owner: "{{ forgejo_repo_owner }}" name: "{{ forgejo_repo_name }}" description: "{{ forgejo_repo_desc|default(omit) }}" private: "{{ forgejo_repo_private|default(omit) }}" auto_init: "{{ forgejo_auto_init|default(omit) }}" default_branch: "{{ forgejo_default_branch|default('main') }}" license: "{{ forgejo_repo_license|default(omit) }}" allow_merge_commits: "{{ forgejo_allow_merge_commits|default(omit) }}" allow_rebase: "{{ forgejo_allow_rebase|default(omit) }}" allow_rebase_explicit: "{{ forgejo_allow_rebase_explicit|default(omit) }}" allow_squash_merge: "{{ forgejo_allow_squash_merge|default(omit) }}" archived: "{{ forgejo_repo_archived|default(omit) }}" ignore_whitespace_conflicts: "{{ forgejo_ignore_whitespace_conflicts|default(omit) }}" has_issues: "{{ forgejo_has_issues|default(omit) }}" has_wiki: "{{ forgejo_has_wiki|default(omit) }}" has_pull_requests: "{{ forgejo_has_pull_requests|default(omit) }}" website: "{{ forgejo_repo_website|default(omit) }}" ...