Skip to content

Latest commit

 

History

History
364 lines (209 loc) · 7.26 KB

REFERENCE.md

File metadata and controls

364 lines (209 loc) · 7.26 KB

Reference

Table of Contents

Classes

Public Classes

  • gitea: main class includes all other classes

Private Classes

  • gitea::config: manages configuration files
  • gitea::install: download and install gitea
  • gitea::service: manage service state
  • gitea::service::user: creates gitea service user

Defined types

Functions

Classes

gitea

Install Gitea, a painless self-hosted Git service. Review module hiera for default parameter values.

Examples

Basic usage
include gitea
Install current supported release
class { 'gitea':
  ensure => 'installed',
}
Install latest release and keep upgraded
class { 'gitea':
  ensure => 'latest',
}
Install specific supported version
class { 'gitea':
  ensure   => '1.18.0',
}
Install specific version not directly supported
class { 'gitea':
  ensure   => '1.17.0',
  checksum => 'bc4a8e1f5d5f64d4be2e50c387de08d07c062aecdba2f742c2f61c20accfcc46',
}
Install compatible build from URL
class { 'gitea':
  ensure   => 'https://codeberg.org/forgejo/forgejo/releases/download/v1.21.6-0/forgejo-1.21.6-0-linux-amd64',
  checksum => 'e86f446236a287b9ba2c65f8ff7b0a9ea4f451a5ffc3134f416f751e1eecf97c',
}

Parameters

The following parameters are available in the gitea class:

manage_user

Data type: Boolean

Should we manage provisioning the user?

manage_group

Data type: Boolean

Should we manage provisioning the group?

manage_home

Data type: Boolean

Should we manage provisioning the home directory?

owner

Data type: String

The user owning gitea

group

Data type: String

The group owning gitea

umask

Data type: Pattern[/[0-7]{4}/]

UMask of service process

home

Data type: Optional[String]

Qualified path to the user home directory

proxy

Data type: Optional[String]

Download gitea release via specified proxy

base_url

Data type: String

Download base URL

ensure

Data type: Variant[Pattern[/\d+\.\d+\.\d+/],Enum['latest','installed'],Stdlib::HTTPUrl]

Version of gitea to install, 'installed', 'latest', or URL a to release binary

checksum

Data type: Optional[String]

Checksum for the release binary

Default value: undef

work_path

Data type: String

Target directory for the gitea installation

default_configuration

Data type: Hash

Settings for configuring Gitea. A simple working configuration is provided (see hiera). Generally this parameter should NOT be provided. Instead set the custom_configuration parameter to override built-in defaults.

custom_configuration

Data type: Hash

Override default configuration for configuring Gitea. The value is merged with the default_configuration parameter value.

manage_service

Data type: Boolean

Should we manage a service definition for Gitea?

service_epp

Data type: String

Path to service epp template file

tmpfile_epp

Data type: String

Path to tmpfile epp template file

robots_txt

Data type: String

Allows to provide a http://www.robotstxt.org/ file to restrict crawling

run_path

Data type: String

Path to service runtime path

Defined types

gitea::custom::file

Manage files in the Gitea CustomPath folder

Examples

custom css
gitea::custom::file { 'public/css/custom.css':
  content => file('profile/gitea/custom.css'),
}
custom logo
gitea::custom::file { 'public/img/logo.svg':
  source => 'puppet:///modules/profile/gitea/logo.svg',
}

Parameters

The following parameters are available in the gitea::custom::file defined type:

ensure

Data type: Optional[Enum['file','absent']]

Passed to File resource

Default value: undef

source

Data type: Variant[String,Undef]

Passed to File resource

Default value: undef

content

Data type: Variant[String,Undef]

Passed to File resource

Default value: undef

recurse

Data type: Variant[Boolean,Enum['remote']]

Passed to File resource

Default value: false

Functions

gitea::archive_resource

Type: Ruby 4.x API

Returns source, checksum, and checksum_type params for downloading a gitea release with the archive resource

gitea::archive_resource(String $gitea_bin, String $base_url, Hash $checksums, String $version, Optional[Variant[String,Undef]] $checksum_value)

The gitea::archive_resource function.

Returns: Hash

gitea_bin

Data type: String

base_url

Data type: String

checksums

Data type: Hash

version

Data type: String

checksum_value

Data type: Optional[Variant[String,Undef]]

gitea::installed_version

Type: Ruby 4.x API

Returns the installed gitea version

gitea::installed_version(String $a)

The gitea::installed_version function.

Returns: Variant[String,Undef]

a

Data type: String