diff --git a/manifests/main/install.pp b/manifests/main/install.pp new file mode 100644 index 0000000..a7c1b84 --- /dev/null +++ b/manifests/main/install.pp @@ -0,0 +1,15 @@ +## confdroid_gitea::main::install.pp +# Module name: confdroid_gitea +# Author: 12ww1160 (12ww1160@confdroid.com) +# @summary installs required packages for the confdroid_gitea Puppet module. +############################################################################## +class confdroid_gitea::main::install ( + +) inherits confdroid_gitea::params { + if $ga_host_fqdn == $fqdn { + package { $ga_reqpackages: + ensure => $ga_pkg_ensure, + } + } +} + diff --git a/manifests/main/user.pp b/manifests/main/user.pp index cab27d1..98fd6ac 100644 --- a/manifests/main/user.pp +++ b/manifests/main/user.pp @@ -7,6 +7,7 @@ class confdroid_gitea::main::user ( ) inherits confdroid_gitea::params { if $ga_host_fqdn == $fqdn { + require confdroid_gitea::main::install user { $ga_user: ensure => 'present', managehome => true, diff --git a/manifests/params.pp b/manifests/params.pp index 22f43a7..4ef35d8 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,10 +11,14 @@ # @param [String] ga_dl_url The download URL for Gitea. # @param [String] ga_dl_version The version of Gitea to download. # @param [String] ga_user The system user for Gitea. +# @param [Array] ga_reqpackages The required packages for Gitea. +# @param [String] ga_pkg_ensure The ensure state for required packages. ############################################################################## 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', @@ -34,6 +38,11 @@ class confdroid_gitea::params ( $os_name = $facts['os']['name'] $os_release = $facts['os']['release']['major'] +# directories + + +# files + # includes must be last include confdroid_gitea::main::config }