siamaksade.openshift_gogs

Ansible Role: Gogs Git Server on OpenShift

This is an Ansible Role for setting up a Gogs Git Server on OpenShift. It creates an admin account and a user account, and also can generate multiple user accounts if set up to do so.

Role Variables

Here is a table of variables you can customize:

Variable Default Value Description
gogs_service_name gogs Name of the Gogs service on OpenShift
gogs_image_version 0.11.29 Version of the Gogs image from Docker Hub
gogs_route gogs-{{ project_name }}.127.0.0.1.nip.io Required. Hostname for Gogs
gogs_admin_user gogs Username for the admin account
gogs_admin_password gogs Password for the admin account
gogs_user developer Username for the user account
gogs_password developer Password for the user account
gogs_generate_user_count 0 Number of user accounts to create with the same password
gogs_generate_user_format user%02d Format for generating usernames
gogs_database_version 9.6 Version of PostgreSQL for the Gogs database
max_mem 2Gi Maximum memory for the Gogs container
min_mem 512Mi Minimum memory for the Gogs container
max_cpu 1 Maximum CPU for the Gogs container
min_cpu 200m Minimum CPU for the Gogs container
clean_deploy false Whether to delete the existing Gogs before a new deployment
project_name gogs Name of the OpenShift project for Gogs
project_display_name Gogs Display name of the OpenShift project for Gogs
project_desc Gogs Git Server Description of the OpenShift project for Gogs
project_admin - User assigned as project admin, if specified
project_annotations - Annotations for the OpenShift project of Gogs
openshift_cli oc Command for OpenShift CLI (like authentication commands)

OpenShift Version Compatibility

When you use this role in requirements.yml, ensure you specify the version:

- src: siamaksade.openshift_gogs
  version: 1.1.0

Here’s a table of confirmed version combinations:

Role Version OpenShift Version
1.0.x 3.7.x
1.1.x 3.9.x, 3.10.x, 3.11.x
1.2.x 4.1.x, 4.2.x

If your version isn't listed, it doesn't mean it won't work; it just means we haven't tested it.

Example Playbook

Here’s an example playbook to use this role:

name: Example Playbook
hosts: localhost
tasks:
- import_role:
    name: siamaksade.openshift_gogs
  vars:
    gogs_route: "gogs-cicd-project.apps.myopenshift.com"
    project_name: "cicd-project"
    gogs_generate_user_count: "50"
    openshift_cli: "oc --server http://master:8443"
Informazioni sul progetto

Gogs Git Server for OpenShift

Installa
ansible-galaxy install siamaksade.openshift_gogs
Licenza
Unknown
Download
16.6k
Proprietario
Product Manager at Red Hat