Add first steps of installation
This commit is contained in:
parent
7076150cb3
commit
09fc474812
1 changed files with 29 additions and 1 deletions
|
@ -9,10 +9,14 @@
|
|||
# [*smtp_server*]
|
||||
# String with the SMTP server to use.
|
||||
#
|
||||
# [*mastodon_home*]
|
||||
# String path to Mastodon user home directory. Default /opt/mastodon
|
||||
#
|
||||
class mastodon (
|
||||
String $ensure = 'present',
|
||||
String $hostname = 'mastodon.example.org',
|
||||
String $smtp_server = 'mail.example.org'
|
||||
String $smtp_server = 'mail.example.org',
|
||||
String $mastodon_home = '/opt/mastodon',
|
||||
) {
|
||||
case $ensure {
|
||||
default: {
|
||||
|
@ -84,4 +88,28 @@ class mastodon (
|
|||
class { 'postgresql::server':
|
||||
}
|
||||
include redis
|
||||
exec { 'enable_corepack':
|
||||
command => '/usr/bin/corepack enable',
|
||||
creates => '/usr/bin/yarn',
|
||||
require => Class['nodejs'],
|
||||
}
|
||||
exec { 'yarn_classic':
|
||||
command => '/usr/bin/yarn set version classic',
|
||||
creates => '/root/.yarnrc',
|
||||
require => Exec['enable_corepack'],
|
||||
}
|
||||
group { 'mastodon': }
|
||||
user { 'mastodon':
|
||||
gid => 'mastodon',
|
||||
home => $mastodon_home,
|
||||
managehome => true,
|
||||
system => true,
|
||||
require => Group['mastodon'],
|
||||
}
|
||||
vcsrepo { 'rbenv':
|
||||
path => "${mastodon_home}/.rbenv",
|
||||
source => 'https://github.com/rbenv/rbenv.git',
|
||||
provider => 'git',
|
||||
require => User['mastodon'],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue