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.
puppet-gitea
depends on- it install dependencies for gitea:
curl
,git
andtar
- 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 port3000
The simplest use case is to rely on defaults. This can be done by simply including the class:
include ::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':
dependencies_ensure => 'present',
dependencies => ['curl', 'git', 'tar'],
}
class { 'gitea::user':
manage_user => true,
manage_group => true,
manage_home => true,
owner => 'git',
group => 'git',
home => '/home/git',
}
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':
manage_service => true,
service_provider => 'systemd',
installation_directory => '/opt/gitea',
log_directory => '/var/log/gitea',
}
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',
}
See metadata.json for supported platforms.
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.