OP#414 add all dirs
This commit is contained in:
@@ -8,12 +8,26 @@ 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 => 'directory',
|
ensure => 'directory',
|
||||||
mode => '0755',
|
mode => '0750',
|
||||||
owner => $ga_user,
|
owner => $ga_user,
|
||||||
group => $ga_user,
|
group => $ga_user,
|
||||||
recurse => true,
|
recurse => true,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
file { [
|
||||||
|
$ga_working_dir,
|
||||||
|
$ga_custom_dir,
|
||||||
|
$ga_data_dir,
|
||||||
|
$ga_log_dir,
|
||||||
|
$ga_tmp_dir,
|
||||||
|
]:
|
||||||
|
ensure => 'directory',
|
||||||
|
mode => '0750',
|
||||||
|
owner => $ga_user,
|
||||||
|
group => $ga_user,
|
||||||
|
recurse => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ 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 { "${ga_working_dir}/gitea":
|
file { "${ga_opt_dir}/gitea":
|
||||||
ensure => 'file',
|
ensure => 'file',
|
||||||
mode => '0755',
|
mode => '0755',
|
||||||
owner => $ga_user,
|
owner => $ga_user,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# @param [String] ga_ssh_port The SSH port number for Gitea.
|
# @param [String] ga_ssh_port The SSH port number for Gitea.
|
||||||
# @param [String] ga_order_prefix The order prefix for firewall rules.
|
# @param [String] ga_order_prefix The order prefix for firewall rules.
|
||||||
# @param [String] ga_host_fqdn The FQDN for the Gitea host.
|
# @param [String] ga_host_fqdn The FQDN for the Gitea host.
|
||||||
# @param [String] ga_working_dir The working directory for Gitea.
|
# @param [String] ga_opt_dir The installation directory for Gitea.
|
||||||
# @param [String] ga_dl_url The download URL for Gitea.
|
# @param [String] ga_dl_url The download URL for Gitea.
|
||||||
# @param [String] ga_dl_version The version of Gitea to download.
|
# @param [String] ga_dl_version The version of Gitea to download.
|
||||||
# @param [String] ga_user The system user for Gitea.
|
# @param [String] ga_user The system user for Gitea.
|
||||||
@@ -20,7 +20,7 @@ class confdroid_gitea::params (
|
|||||||
Array $ga_reqpackages = ['git', 'wget', 'tar'],
|
Array $ga_reqpackages = ['git', 'wget', 'tar'],
|
||||||
String $ga_pkg_ensure = 'present',
|
String $ga_pkg_ensure = 'present',
|
||||||
String $ga_host_fqdn = 'gitea.example.net',
|
String $ga_host_fqdn = 'gitea.example.net',
|
||||||
String $ga_working_dir = '/opt/gitea',
|
String $ga_opt_dir = '/opt/gitea',
|
||||||
String $ga_dl_url = 'https://dl.gitea.com/gitea',
|
String $ga_dl_url = 'https://dl.gitea.com/gitea',
|
||||||
String $ga_dl_version = '1.25.4',
|
String $ga_dl_version = '1.25.4',
|
||||||
String $ga_user = 'git',
|
String $ga_user = 'git',
|
||||||
@@ -33,12 +33,17 @@ class confdroid_gitea::params (
|
|||||||
|
|
||||||
) {
|
) {
|
||||||
# facts
|
# facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
$domain = $facts['networking']['domain']
|
$domain = $facts['networking']['domain']
|
||||||
$os_name = $facts['os']['name']
|
$os_name = $facts['os']['name']
|
||||||
$os_release = $facts['os']['release']['major']
|
$os_release = $facts['os']['release']['major']
|
||||||
|
|
||||||
# directories
|
# 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"
|
||||||
|
|
||||||
# files
|
# files
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user