Recommit for updates in build 15
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
</li><li>
|
||||
<p>manage directory structure</p>
|
||||
</li><li>
|
||||
<p>manage configuration files</p>
|
||||
<p>manage configuration files including app.ini content</p>
|
||||
</li><li>
|
||||
<p>file system permissions</p>
|
||||
</li><li>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</li><li>
|
||||
<p>manage directory structure</p>
|
||||
</li><li>
|
||||
<p>manage configuration files</p>
|
||||
<p>manage configuration files including app.ini content</p>
|
||||
</li><li>
|
||||
<p>file system permissions</p>
|
||||
</li><li>
|
||||
|
||||
@@ -114,7 +114,31 @@
|
||||
16
|
||||
17
|
||||
18
|
||||
19</pre>
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
@@ -115,7 +115,15 @@
|
||||
17
|
||||
18
|
||||
19
|
||||
20</pre>
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||
@@ -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),
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_working_dir</span>
|
||||
<span class='name'>ga_opt_dir</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The working directory for Gitea.</p>
|
||||
<p>The installation directory for Gitea.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@@ -304,6 +304,96 @@
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The ensure state for required packages.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_domain</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'localhost'</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The domain for the Gitea host. defaults to ‘localhost’.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_root_url</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'http://localhost:3000'</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The root URL for Gitea. defaults to ‘<a href="http://localhost:3000">localhost:3000</a>’.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_disable_ssh</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Whether to disable SSH access in Gitea.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_start_lfs</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Whether to start Git LFS support in Gitea.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>ga_start_ssh</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Whether to start SSH support in Gitea.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@@ -319,13 +409,6 @@
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
@@ -349,21 +432,49 @@
|
||||
44
|
||||
45
|
||||
46
|
||||
47</pre>
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 17</span>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 24</span>
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user