diff --git a/doc/file.README.html b/doc/file.README.html index b4838ac..7842b9b 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -87,7 +87,7 @@
manage directory structure
manage configuration files
+manage configuration files including app.ini content
file system permissions
manage directory structure
manage configuration files
+manage configuration files including app.ini content
file system permissions
# File 'manifests/main/dirs.pp', line 6
@@ -124,13 +148,37 @@ class confdroid_gitea::main::dirs (
) inherits confdroid_gitea::params {
if $ga_host_fqdn == $fqdn {
require confdroid_gitea::main::user
- file { $ga_working_dir:
+ file { $ga_opt_dir:
ensure => 'directory',
- mode => '0755',
+ mode => '0750',
owner => $ga_user,
group => $ga_user,
recurse => true,
}
+
+ file { [
+ $ga_working_dir,
+ $ga_custom_dir,
+ $ga_data_dir,
+ $ga_log_dir,
+ $ga_tmp_dir,
+ $ga_git_dir,
+ $ga_repo_dir,
+ $ga_uploads_dir,
+ ]:
+ ensure => 'directory',
+ mode => '0750',
+ owner => $ga_user,
+ group => $ga_user,
+ recurse => true,
+ }
+ file { $ga_conf_dir:
+ ensure => 'directory',
+ mode => '0770',
+ owner => 'root',
+ group => $ga_user,
+ recurse => true,
+ }
}
}
# File 'manifests/main/files.pp', line 6
@@ -126,13 +134,21 @@ class confdroid_gitea::main::files (
if $ga_host_fqdn == $fqdn {
require confdroid_gitea::main::dirs
- file { "${ga_working_dir}/gitea":
+ file { "${ga_opt_dir}/gitea":
ensure => 'file',
mode => '0755',
owner => $ga_user,
group => $ga_user,
source => "${ga_dl_url}/${ga_dl_version}/gitea-${ga_dl_version}-linux-amd64",
}
+
+ file { $ga_config_file:
+ ensure => 'file',
+ owner => $ga_user,
+ group => $ga_user,
+ mode => '0640',
+ content => template($ga_config_erb),
+ }
}
}
The working directory for Gitea.
+The installation directory for Gitea.
The ensure state for required packages.
+The domain for the Gitea host. defaults to ‘localhost’.
+The root URL for Gitea. defaults to ‘localhost:3000’.
+Whether to disable SSH access in Gitea.
+Whether to start Git LFS support in Gitea.
+Whether to start SSH support in Gitea.
-17 -18 -19 -20 -21 -22 -23 24 25 26 @@ -349,21 +432,49 @@ 44 45 46 -47+47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70
# File 'manifests/params.pp', line 17
+ # File 'manifests/params.pp', line 24
class confdroid_gitea::params (
# main
- Array $ga_reqpackages = ['git', 'wget', 'tar'],
- String $ga_pkg_ensure = 'present',
- String $ga_host_fqdn = 'gitea.example.net',
- String $ga_working_dir = '/opt/gitea',
- String $ga_dl_url = 'https://dl.gitea.com/gitea',
- String $ga_dl_version = '1.25.4',
- String $ga_user = 'git',
+ Array $ga_reqpackages = ['git', 'wget', 'tar'],
+ String $ga_pkg_ensure = 'present',
+ String $ga_host_fqdn = 'gitea.example.net',
+ String $ga_opt_dir = '/opt/gitea',
+ String $ga_dl_url = 'https://dl.gitea.com/gitea',
+ String $ga_dl_version = '1.25.4',
+ String $ga_user = 'git',
+ String $ga_domain = 'localhost',
+ String $ga_root_url = 'http://localhost:3000',
+ Boolean $ga_disable_ssh = false,
+ Boolean $ga_start_lfs = true,
+ Boolean $ga_start_ssh = false,
# firewall
Boolean $ga_use_firewall = true,
@@ -373,14 +484,25 @@ class confdroid_gitea::params (
) {
# facts
- $fqdn = $facts['networking']['fqdn']
- $domain = $facts['networking']['domain']
- $os_name = $facts['os']['name']
- $os_release = $facts['os']['release']['major']
+ $fqdn = $facts['networking']['fqdn']
+ $domain = $facts['networking']['domain']
+ $os_name = $facts['os']['name']
+ $os_release = $facts['os']['release']['major']
# directories
+ $ga_working_dir ='/var/lib/gitea'
+ $ga_custom_dir = "${ga_working_dir}/custom"
+ $ga_data_dir = "${ga_working_dir}/data"
+ $ga_log_dir = "${ga_working_dir}/log"
+ $ga_tmp_dir = "${ga_working_dir}/tmp"
+ $ga_conf_dir = '/etc/gitea'
+ $ga_git_dir = "${ga_data_dir}/git"
+ $ga_repo_dir = "${ga_git_dir}/repositories"
+ $ga_uploads_dir = "${ga_data_dir}/uploads"
# files
+ $ga_config_file = "${ga_conf_dir}/app.ini"
+ $ga_config_erb = 'confdroid_gitea/app.ini.erb'
# includes must be last
include confdroid_gitea::main::config