mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
Update to 2022-10-25 10:00
This commit is contained in:
parent
8788a655d7
commit
c5d3ee9d98
@ -1,11 +1,11 @@
|
||||
---
|
||||
|
||||
# Version to deploy
|
||||
sftpgo_version: 2.3.6
|
||||
sftpgo_version: 2.4.0
|
||||
# URL of the archive
|
||||
sftpgo_archive_url: https://github.com/drakkan/sftpgo/releases/download/v{{ sftpgo_version }}/sftpgo_v{{ sftpgo_version }}_linux_x86_64.tar.xz
|
||||
# Expected sha1 of the archive
|
||||
sftpgo_archive_sha256: 19a8df7194711c9fc1a5e5e7bbeed28781ea8204c8bdc941653ac7169846a746
|
||||
sftpgo_archive_sha256: 27de6446706c91717eabd6c4d74f80c0bba906639b698a409730e91b77d870fc
|
||||
|
||||
# Should ansible handle upgrades ? If False, only initial install will be done
|
||||
sftpgo_manage_upgrade: True
|
||||
@ -86,12 +86,6 @@ sftpgo_base_conf:
|
||||
delayed_quota_update: 60
|
||||
pool_size: 5
|
||||
users_base_dir: "{{ sftpgo_root_dir }}/data/home/"
|
||||
# If you want to allow anonymous FTP, you can create a user named anonymous (set a password to whatever you want, it won't be checked)
|
||||
# and enable the following settings
|
||||
# This hook will accept any password for the anonymous user
|
||||
# check_password_hook: "{{ sftpgo_root_dir }}/bin/anonymous-ftp-password-hook"
|
||||
# This will restrict the hook to the FTP protocol
|
||||
# check_password_scope: 2
|
||||
httpd:
|
||||
bindings:
|
||||
port: 8080
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [[ "${SFTPGO_AUTHD_USERNAME:=}" != "anonymous" ]]; then
|
||||
cat <<_EOF
|
||||
{
|
||||
"status": 2,
|
||||
"to_verify": "${SFTPGO_AUTHD_PASSWORD:=}"
|
||||
}
|
||||
_EOF
|
||||
else
|
||||
cat <<_EOF
|
||||
{
|
||||
"status": 1
|
||||
}
|
||||
_EOF
|
||||
fi
|
40
roles/sftpgo/files/hooks/example-external-auth.sh
Normal file
40
roles/sftpgo/files/hooks/example-external-auth.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
if [[ "${SFTPGO_AUTHD_USERNAME:=}" != "anonymous" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
cat <<EOF
|
||||
{
|
||||
"status": 1,
|
||||
"username": "anonymous",
|
||||
"home_dir": "/opt/sftpgo/data/home/anonymous",
|
||||
"permissions": {
|
||||
"/": [
|
||||
"list",
|
||||
"download"
|
||||
]
|
||||
},
|
||||
"virtual_folders": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "firmwares",
|
||||
"mapped_path": "/opt/sftpgo/data/folders/firmwares",
|
||||
"description": "Android firmwares",
|
||||
"used_quota_size": 0,
|
||||
"used_quota_files": 0,
|
||||
"last_quota_update": 0,
|
||||
"filesystem": {
|
||||
"provider": 0,
|
||||
"s3config": {},
|
||||
"gcsconfig": {},
|
||||
"azblobconfig": {},
|
||||
"cryptconfig": {},
|
||||
"sftpconfig": {}
|
||||
},
|
||||
"virtual_path": "/firmwares",
|
||||
"quota_size": -1,
|
||||
"quota_files": -1
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
@ -76,6 +76,14 @@
|
||||
template: src=dehydrated_hook.j2 dest=/etc/dehydrated/hooks_deploy_cert.d/sftpgo mode=755
|
||||
tags: sftpgo
|
||||
|
||||
- name: Remove obsolete SFTPGo hooks
|
||||
file: path={{ sftpgo_root_dir }}/bin/{{ item }} state=absent
|
||||
loop:
|
||||
- anonymous-ftp-password-hook
|
||||
- check-anonymous.sh
|
||||
- external-auth.sh
|
||||
tags: sftpgo
|
||||
|
||||
- name: Install SFTPGo hooks
|
||||
copy: src=hooks/ dest={{ sftpgo_root_dir }}/bin/ mode=755
|
||||
tags: sftpgo
|
||||
|
Loading…
x
Reference in New Issue
Block a user