Skip to content

wilful/puppet-gitea

 
 

Repository files navigation

puppet-gitea

Build Status Puppet Forge Puppet Forge - downloads Puppet Forge - scores

Description

A Puppet module for managing Gitea (Git with a cup of tea) settings. This module allows you to install and configure Gitea using pre-built binaries and does not need external package repositories. You can chose to install Gitea with default settings, or customize all settings to your liking.

Setup

What Gitea affects

  • puppet-gitea depends on
  • it install dependencies for gitea: curl, git and tar
  • it manages a user and group git
  • it manages the gitea directory (/opt/gitea) and the repositories (/var/git)
  • it install a gitea service listening on port 3000

Beginning with Gitea

The simplest use case is to rely on defaults. This can be done by simply including the class:

include ::gitea

Reference

Class: gitea

class { 'gitea':
    package_ensure => 'present',
    dependencies_ensure => 'present',
    dependencies => ['curl', 'git', 'tar'],
    manage_user => true,
    manage_group => true,
    manage_home => true,
    owner => 'git',
    group => 'git',
    home => '/home/git',
    version => '1.1.0',
    checksum => '59cd3fb52292712bd374a215613d6588122d93ab19d812b8393786172b51d556',
    checksum_type => 'sha256',
    installation_directory => '/opt/gitea',
    repository_root => '/var/git',
    log_directory => '/var/log/gitea',
    attachment_directory => '/opt/gitea/data/attachments',
    lfs_content_directory => '/opt/gitea/data/lfs',
    configuration_sections => {},
    manage_service => true,
    service_template => 'gitea/systemd.erb',
    service_path => '/lib/systemd/system/gitea.service',
    service_provider => 'systemd',
    service_mode => '0644',
}

Class: gitea::packages

class { 'gitea::packages':
    dependencies_ensure => 'present',
    dependencies => ['curl', 'git', 'tar'],
}

Class: gitea::user

class { 'gitea::user':
    manage_user => true,
    manage_group => true,
    manage_home => true,
    owner => 'git',
    group => 'git',
    home => '/home/git',
}

Class: gitea::install

class { 'gitea::install':
    package_ensure => 'present',
    owner => 'git',
    group => 'git',
    version => '1.1.0',
    checksum => '59cd3fb52292712bd374a215613d6588122d93ab19d812b8393786172b51d556',
    checksum_type => 'sha256',
    installation_directory => '/opt/gitea',
    repository_root => '/var/git',
    log_directory => '/var/log/gitea',
    attachment_directory => '/opt/gitea/data/attachments',
    lfs_content_directory => '/opt/gitea/data/lfs',
    manage_service => true,
    service_template => 'gitea/systemd.erb',
    service_path => '/lib/systemd/system/gitea.service',
    service_provider => 'systemd',
    service_mode => '0644',
}

Class: gitea::service

class { 'gitea::service':
    manage_service => true,
    service_provider => 'systemd',
    installation_directory => '/opt/gitea',
    log_directory => '/var/log/gitea',
}

Class: gitea::config

class { 'gitea::config':
    configuration_sections => {},
    owner => 'git',
    group => 'git',
    installation_directory => '/opt/gitea',
    repository_root => '/var/git',
    attachment_directory => '/opt/gitea/data/attachments',
    lfs_content_directory => '/opt/gitea/data/lfs',
}

Limitations

See metadata.json for supported platforms.

Development

Running tests

This project contains tests for rspec-puppet.

Quickstart:

gem install bundler
bundle install
bundle exec rake test

When submitting pull requests, please make sure that module documentation, test cases and syntax checks pass.

About

A Puppet module to manage Gitea.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Puppet 51.9%
  • Ruby 47.2%
  • HTML 0.9%