Puppet Class: confdroid_gitea::params

Summary

holds all parameters for the confdroid_gitea Puppet module.

Overview

confdroid_gitea::params.pp Module name: confdroid_gitea Author: 12ww1160 (12ww1160@confdroid.com) @param [String] ga_admin_allow_create_organization Whether to allow admin to create organizations in Gitea.

Parameters:

  • ga_use_firewall (Boolean) (defaults to: true)

    Whether to enable firewall rules for Gitea.

  • ga_http_port (String) (defaults to: '3000')

    The main port number for Gitea.

  • ga_ssh_port (String) (defaults to: '22')

    The SSH port number for Gitea.

  • ga_order_prefix (String) (defaults to: '50')

    The order prefix for firewall rules.

  • ga_host_fqdn (String) (defaults to: 'gitea.example.net')

    The FQDN for the Gitea host.

  • ga_opt_dir (String) (defaults to: '/opt/gitea')

    The installation directory for Gitea.

  • ga_dl_url (String) (defaults to: 'https://dl.gitea.com/gitea')

    The download URL for Gitea.

  • ga_dl_version (String) (defaults to: '1.25.4')

    The version of Gitea to download.

  • ga_user (String) (defaults to: 'git')

    The system user for Gitea.

  • ga_reqpackages (Array) (defaults to: ['git', 'wget', 'tar'])

    The required packages for Gitea.

  • ga_pkg_ensure (String) (defaults to: 'present')

    The ensure state for required packages.

  • ga_domain (String) (defaults to: 'localhost')

    The domain for the Gitea host. defaults to ‘localhost’.

  • ga_root_url (String) (defaults to: 'http://localhost:3000')

    The root URL for Gitea. defaults to ‘localhost:3000’.

  • ga_disable_ssh (Boolean) (defaults to: false)

    Whether to disable SSH access in Gitea.

  • ga_start_lfs (Boolean) (defaults to: true)

    Whether to start Git LFS support in Gitea.

  • ga_start_ssh (Boolean) (defaults to: false)

    Whether to start SSH support in Gitea.

  • ga_db_type (String) (defaults to: 'postgres')

    The database type for Gitea.

  • ga_db_host (String) (defaults to: 'localhost')

    The database host for Gitea.

  • ga_db_port (String) (defaults to: '5432')

    The database port for Gitea.

  • ga_db_name (String) (defaults to: 'gitea')

    The database name for Gitea.

  • ga_db_user (String) (defaults to: 'ChangeMe')

    The database user for Gitea.

  • ga_db_password (String) (defaults to: 'ChangeMe')

    The database password for Gitea.

  • ga_log_sql (Boolean) (defaults to: false)

    Whether to enable SQL query logging in Gitea.

  • ga_ssl_mode (String) (defaults to: 'require')

    The SSL mode for the database connection in Gitea.

  • ga_log_mode (String) (defaults to: 'file')

    The log mode for Gitea.

  • ga_log_level (String) (defaults to: 'info')

    The log level for Gitea.

  • ga_install_lock (Boolean) (defaults to: true)

    Whether to enable the install lock for Gitea.

  • ga_secret_key (String) (defaults to: 'ChangeMe1234567890')

    The secret key for Gitea.

  • ga_reverse_proxy_limit (String) (defaults to: '1')

    The reverse proxy limit for Gitea.

  • ga_reverse_proxy_trusted_proxies (String) (defaults to: '*')

    The trusted proxies for reverse proxy in Gitea.

  • ga_disable_root_check (Boolean) (defaults to: true)

    Whether to disable the root check in Gitea.

  • ga_disable_registration (Boolean) (defaults to: false)

    Whether to disable user registration in Gitea.

  • ga_require_signin_view (Boolean) (defaults to: false)

    Whether to require sign-in to view in Gitea.

  • ga_admin_username (String) (defaults to: 'admin')

    The admin username for Gitea.

  • ga_admin_password (String) (defaults to: 'ChangeMeAdmin123!')

    The admin password for Gitea.

  • ga_admin_email (String) (defaults to: 'admin@example.com')

    The admin email for Gitea.

  • ga_enable_packages (Boolean) (defaults to: true)

    Whether to allow packages registry in Gitea.

  • ga_enable_registry (Boolean) (defaults to: true)

    Whether to allow container registry in Gitea.

  • ga_storage_type (String) (defaults to: 'filesystem')

    The storage type for Gitea.

  • ga_instance_name (String) (defaults to: 'Your Gitea Instance')

    The instance name for Gitea.

  • ga_lfs_jwt_secret (String) (defaults to: 'ChangeMeLFSJWTSecret')

    The JWT secret for Git L FS in Gitea.

  • ga_internal_token (String) (defaults to: 'ChangeMeInternalToken')

    The internal token for Gitea.

  • ga_jwt_secret (String) (defaults to: 'ChangeMeJWTSecret')

    The JWT secret for Gitea.

  • ga_admin_allow_create_organization (String) (defaults to: 'true')


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'manifests/params.pp', line 64

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_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,
  String $ga_instance_name                    = 'Your Gitea Instance',
  String $ga_lfs_jwt_secret                   = 'ChangeMeLFSJWTSecret',

  # database
  String $ga_db_type                          = 'postgres',
  String $ga_db_host                          = 'localhost',
  String $ga_db_port                          = '5432',
  String $ga_db_name                          = 'gitea',
  String $ga_db_user                          = 'ChangeMe',
  String $ga_db_password                      = 'ChangeMe',
  Boolean $ga_log_sql                         = false,
  String $ga_ssl_mode                         = 'require',
  # logging
  String $ga_log_mode                         = 'file',
  String $ga_log_level                        = 'info',
  # security
  Boolean $ga_install_lock                    = true,
  String $ga_secret_key                       = 'ChangeMe1234567890',
  String $ga_reverse_proxy_limit              = '1',
  String $ga_reverse_proxy_trusted_proxies    = '*',
  Boolean $ga_disable_root_check              = true,
  String $ga_admin_username                   = 'admin',
  String $ga_admin_password                   = 'ChangeMeAdmin123!',
  String $ga_admin_email                      = 'admin@example.com',
  String $ga_admin_allow_create_organization  = 'true',
  String $ga_internal_token                   = 'ChangeMeInternalToken',
  String $ga_jwt_secret                       = 'ChangeMeJWTSecret',
  # service
  Boolean $ga_disable_registration            = false,
  Boolean $ga_require_signin_view             = false,
  Boolean $ga_enable_packages                 = true,
  Boolean $ga_enable_registry                 = true,
  String $ga_storage_type                     = 'filesystem',
  # firewall
  Boolean $ga_use_firewall                    = true,
  String $ga_http_port                        = '3000',
  String $ga_ssh_port                         = '22',
  String $ga_order_prefix                     = '50',

) {
# facts
  $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"
  $ga_indexer_dir       = "${ga_data_dir}/indexers"
  $ga_sessions_dir      = "${ga_data_dir}/sessions"
  $ga_avatars_dir       = "${ga_data_dir}/avatars"
  $ga_repo_avatars_dir  = "${ga_data_dir}/repo-avatars"
  $ga_attachments_dir   = "${ga_data_dir}/attachments"
  $ga_lfs_dir           = "${ga_data_dir}/lfs"

# files
  $ga_config_file   = "${ga_conf_dir}/app.ini"
  $ga_config_erb    = 'confdroid_gitea/app.ini.erb'
  $ga_service_file  = '/etc/systemd/system/gitea.service'
  $ga_service_erb   = 'confdroid_gitea/gitea_service.erb'

# Service 
  $ga_service_name  = 'gitea'

# includes must be last
  include confdroid_gitea::main::config
}