Recommit for updates in build 15

This commit is contained in:
2026-02-04 15:26:03 +01:00
parent 306a8eb633
commit c3298c512d
5 changed files with 215 additions and 29 deletions

View File

@@ -87,7 +87,7 @@
</li><li> </li><li>
<p>manage directory structure</p> <p>manage directory structure</p>
</li><li> </li><li>
<p>manage configuration files</p> <p>manage configuration files including app.ini content</p>
</li><li> </li><li>
<p>file system permissions</p> <p>file system permissions</p>
</li><li> </li><li>

View File

@@ -87,7 +87,7 @@
</li><li> </li><li>
<p>manage directory structure</p> <p>manage directory structure</p>
</li><li> </li><li>
<p>manage configuration files</p> <p>manage configuration files including app.ini content</p>
</li><li> </li><li>
<p>file system permissions</p> <p>file system permissions</p>
</li><li> </li><li>

View File

@@ -114,7 +114,31 @@
16 16
17 17
18 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>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span> <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 { ) inherits confdroid_gitea::params {
if $ga_host_fqdn == $fqdn { if $ga_host_fqdn == $fqdn {
require confdroid_gitea::main::user require confdroid_gitea::main::user
file { $ga_working_dir: file { $ga_opt_dir:
ensure =&gt; &#39;directory&#39;, ensure =&gt; &#39;directory&#39;,
mode =&gt; &#39;0755&#39;, mode =&gt; &#39;0750&#39;,
owner =&gt; $ga_user, owner =&gt; $ga_user,
group =&gt; $ga_user, group =&gt; $ga_user,
recurse =&gt; true, recurse =&gt; 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 =&gt; &#39;directory&#39;,
mode =&gt; &#39;0750&#39;,
owner =&gt; $ga_user,
group =&gt; $ga_user,
recurse =&gt; true,
}
file { $ga_conf_dir:
ensure =&gt; &#39;directory&#39;,
mode =&gt; &#39;0770&#39;,
owner =&gt; &#39;root&#39;,
group =&gt; $ga_user,
recurse =&gt; true,
}
} }
}</pre> }</pre>
</td> </td>

View File

@@ -115,7 +115,15 @@
17 17
18 18
19 19
20</pre> 20
21
22
23
24
25
26
27
28</pre>
</td> </td>
<td> <td>
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span> <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 { if $ga_host_fqdn == $fqdn {
require confdroid_gitea::main::dirs require confdroid_gitea::main::dirs
file { &quot;${ga_working_dir}/gitea&quot;: file { &quot;${ga_opt_dir}/gitea&quot;:
ensure =&gt; &#39;file&#39;, ensure =&gt; &#39;file&#39;,
mode =&gt; &#39;0755&#39;, mode =&gt; &#39;0755&#39;,
owner =&gt; $ga_user, owner =&gt; $ga_user,
group =&gt; $ga_user, group =&gt; $ga_user,
source =&gt; &quot;${ga_dl_url}/${ga_dl_version}/gitea-${ga_dl_version}-linux-amd64&quot;, source =&gt; &quot;${ga_dl_url}/${ga_dl_version}/gitea-${ga_dl_version}-linux-amd64&quot;,
} }
file { $ga_config_file:
ensure =&gt; &#39;file&#39;,
owner =&gt; $ga_user,
group =&gt; $ga_user,
mode =&gt; &#39;0640&#39;,
content =&gt; template($ga_config_erb),
}
} }
}</pre> }</pre>
</td> </td>

View File

@@ -202,7 +202,7 @@
<li> <li>
<span class='name'>ga_working_dir</span> <span class='name'>ga_opt_dir</span>
<span class='type'>(<tt>String</tt>)</span> <span class='type'>(<tt>String</tt>)</span>
@@ -213,7 +213,7 @@
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>The working directory for Gitea.</p> <p>The installation directory for Gitea.</p>
</div> </div>
</li> </li>
@@ -304,6 +304,96 @@
&mdash; &mdash;
<div class='inline'> <div class='inline'>
<p>The ensure state for required packages.</p> <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>&#39;localhost&#39;</tt>)</em>
&mdash;
<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>&#39;http://localhost:3000&#39;</tt>)</em>
&mdash;
<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>
&mdash;
<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>
&mdash;
<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>
&mdash;
<div class='inline'>
<p>Whether to start SSH support in Gitea.</p>
</div> </div>
</li> </li>
@@ -319,13 +409,6 @@
<pre class="lines"> <pre class="lines">
17
18
19
20
21
22
23
24 24
25 25
26 26
@@ -349,21 +432,49 @@
44 44
45 45
46 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>
<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 ( class confdroid_gitea::params (
# main # main
Array $ga_reqpackages = [&#39;git&#39;, &#39;wget&#39;, &#39;tar&#39;], Array $ga_reqpackages = [&#39;git&#39;, &#39;wget&#39;, &#39;tar&#39;],
String $ga_pkg_ensure = &#39;present&#39;, String $ga_pkg_ensure = &#39;present&#39;,
String $ga_host_fqdn = &#39;gitea.example.net&#39;, String $ga_host_fqdn = &#39;gitea.example.net&#39;,
String $ga_working_dir = &#39;/opt/gitea&#39;, String $ga_opt_dir = &#39;/opt/gitea&#39;,
String $ga_dl_url = &#39;https://dl.gitea.com/gitea&#39;, String $ga_dl_url = &#39;https://dl.gitea.com/gitea&#39;,
String $ga_dl_version = &#39;1.25.4&#39;, String $ga_dl_version = &#39;1.25.4&#39;,
String $ga_user = &#39;git&#39;, String $ga_user = &#39;git&#39;,
String $ga_domain = &#39;localhost&#39;,
String $ga_root_url = &#39;http://localhost:3000&#39;,
Boolean $ga_disable_ssh = false,
Boolean $ga_start_lfs = true,
Boolean $ga_start_ssh = false,
# firewall # firewall
Boolean $ga_use_firewall = true, Boolean $ga_use_firewall = true,
@@ -373,14 +484,25 @@ class confdroid_gitea::params (
) { ) {
# facts # facts
$fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;] $fqdn = $facts[&#39;networking&#39;][&#39;fqdn&#39;]
$domain = $facts[&#39;networking&#39;][&#39;domain&#39;] $domain = $facts[&#39;networking&#39;][&#39;domain&#39;]
$os_name = $facts[&#39;os&#39;][&#39;name&#39;] $os_name = $facts[&#39;os&#39;][&#39;name&#39;]
$os_release = $facts[&#39;os&#39;][&#39;release&#39;][&#39;major&#39;] $os_release = $facts[&#39;os&#39;][&#39;release&#39;][&#39;major&#39;]
# directories # directories
$ga_working_dir =&#39;/var/lib/gitea&#39;
$ga_custom_dir = &quot;${ga_working_dir}/custom&quot;
$ga_data_dir = &quot;${ga_working_dir}/data&quot;
$ga_log_dir = &quot;${ga_working_dir}/log&quot;
$ga_tmp_dir = &quot;${ga_working_dir}/tmp&quot;
$ga_conf_dir = &#39;/etc/gitea&#39;
$ga_git_dir = &quot;${ga_data_dir}/git&quot;
$ga_repo_dir = &quot;${ga_git_dir}/repositories&quot;
$ga_uploads_dir = &quot;${ga_data_dir}/uploads&quot;
# files # files
$ga_config_file = &quot;${ga_conf_dir}/app.ini&quot;
$ga_config_erb = &#39;confdroid_gitea/app.ini.erb&#39;
# includes must be last # includes must be last
include confdroid_gitea::main::config include confdroid_gitea::main::config