ARCHIVED
use container instead

Fabian Peter Hammerle 6c61654d7e combine configuration of init script into one task 8 жил өмнө
defaults 2673cef833 Try latest version of Gogs. 8 жил өмнө
handlers 1b56456b68 Actually add restart gogs handler. 8 жил өмнө
meta 18536d8d92 Use Travis to Galaxy notifications. 8 жил өмнө
tasks 6c61654d7e combine configuration of init script into one task 8 жил өмнө
tests 451bf664be Fix a couple simple test failures with updated build. 8 жил өмнө
vars 6c61654d7e combine configuration of init script into one task 8 жил өмнө
.travis.yml 2673cef833 Try latest version of Gogs. 8 жил өмнө
README.md 04f3fb26dc Switch to more efficient Docker test setup. 8 жил өмнө

README.md

Ansible Role: Gogs

Build Status

Installs Gogs, a Go-based front-end to Git, on RedHat or Debian-based linux systems.

After the playbook is finished, visit the gogs server (on port 3000 by default), and you will be redirected to the /install page, where you can configure an administrator account and other default options.

Requirements

Requires git (via geerlingguy.git), and at least the Gogs HTTP port (3000 by default) open on your system's firewall. Install MySQL (e.g. via geerlingguy.mysql) prior to installing Gogs if you would like to use MySQL instead of built-in SQLite support.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

gogs_user: git
gogs_user_home: /home/git

The user and home under which Gogs will run and be installed.

gogs_binary_url: https://github.com/gogits/gogs/releases/download/v0.3.1/linux_amd64.zip

Download URL for the Gogs binary.

gogs_http_port: "3000"

HTTP port over which Gogs will be accessed.

gogs_use_mysql: false
gogs_db_name: gogs
gogs_db_username: gogs
gogs_db_password: root

MySQL database support. Set gogs_use_mysql to true to configure MySQL for gogs, using the database name, username, and password defined by the respective variables.

Dependencies

  • geerlingguy.git

Example Playbook

- hosts: servers
  vars_files:
    - vars/main.yml
  roles:
    - { role: geerlingguy.gogs }

Inside vars/main.yml:

gogs_http_port: "8080"

TODO

  • Preconfigure gogs so installation is simpler/more robust.
  • Make Gogs version more easily configurable.
  • (Maybe) add option to build Gogs from source (instead of binary installation).

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.