feat: initial commit

This commit is contained in:
amy 2025-04-01 17:40:03 +00:00
commit 38f495e3f4
457 changed files with 40577 additions and 0 deletions

View file

@ -0,0 +1,43 @@
class owncloud {
contain owncloud::install
contain owncloud::config
contain owncloud::service
}
class owncloud::install {
file { '/opt/owncloud':
ensure => directory
}
file { '/opt/owncloud/ocis':
ensure => file,
source => 'https://github.com/owncloud/ocis/releases/download/v7.1.2/ocis-7.1.2-linux-amd64',
mode => '0744'
}
}
class owncloud::config {
file { '/opt/owncloud/ocis.yaml':
ensure => file,
source => 'puppet:///modules/owncloud/ocis.yaml',
notify => Service['owncloud']
}
}
class owncloud::service {
file { '/lib/systemd/system/owncloud.service':
ensure => file,
content => template('owncloud/owncloud.service.erb'),
notify => Service['owncloud']
}~>
exec { 'owncloud-systemd-reload':
command => 'systemctl daemon-reload',
path => [ '/usr/bin', '/bin', '/usr/sbin' ],
refreshonly => true,
}
service { 'owncloud':
ensure => running,
enable => true,
}
}

View file

@ -0,0 +1,32 @@
[Unit]
Description=OwnCloud
Wants=basic.target
After=basic.target network.target
[Service]
WorkingDirectory=/opt/owncloud
ExecStart=/opt/owncloud/ocis server
Environment="PROXY_HTTP_ADDR=0.0.0.0:9200"
Environment="OCIS_URL=https://cloud.amy.mov"
Environment="OCIS_BASE_DATA_PATH=/opt/owncloud/"
Environment="OCIS_CONFIG_DIR=/opt/owncloud/"
Environment="OCIS_INSECURE=true"
Environment="STORAGE_USERS_DRIVER=s3ng"
Environment="STORAGE_HOME_DRIVER=s3ng"
Environment="STORAGE_METADATA_DRIVER=ocis"
Environment="STORAGE_USERS_S3NG_REGION=garage"
Environment="STORAGE_USERS_S3NG_ENDPOINT=https://internal-s3.amy.mov"
Environment="STORAGE_USERS_S3NG_SECRET_KEY="<%= @oc_s3_secret_key %>"
Environment="STORAGE_USERS_S3NG_ACCESS_KEY="<%= @oc_s3_access_key %>"
Environment="STORAGE_USERS_S3NG_BUCKET=cloud"
KillMode=process
Restart=on-failure
RestartSec=30s
[Install]
WantedBy=multi-user.target