2020-10-23 13:22:35 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
|
|
|
'python3-radicale': {},
|
|
|
|
},
|
|
|
|
},
|
2020-11-13 11:37:26 +00:00
|
|
|
'backups': {
|
|
|
|
'paths': {
|
|
|
|
'/var/lib/radicale',
|
|
|
|
},
|
|
|
|
},
|
2021-07-17 08:17:39 +00:00
|
|
|
'zfs': {
|
|
|
|
'datasets': {
|
|
|
|
'tank/radicale': {
|
|
|
|
'mountpoint': '/var/lib/radicale',
|
|
|
|
'needed_by': {
|
2021-07-23 10:56:29 +00:00
|
|
|
'directory:/var/lib/radicale/collections',
|
2021-07-17 08:17:39 +00:00
|
|
|
'pkg_apt:python3-radicale',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-10-23 13:22:35 +00:00
|
|
|
}
|
2021-07-23 10:56:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
|
|
'nginx/vhosts/radicale',
|
|
|
|
)
|
|
|
|
def nginx(metadata):
|
|
|
|
if not node.has_bundle('nginx'):
|
|
|
|
raise DoNotRunAgain
|
|
|
|
|
|
|
|
return {
|
|
|
|
'nginx': {
|
|
|
|
'vhosts': {
|
|
|
|
'radicale': {
|
|
|
|
'domain': metadata.get('radicale/domain'),
|
|
|
|
'locations': {
|
|
|
|
'/': {
|
|
|
|
'target': 'http://[::1]:22050',
|
|
|
|
'auth': {
|
|
|
|
'file': '/etc/radicale/htpasswd',
|
|
|
|
},
|
|
|
|
'proxy_set_header': {
|
|
|
|
'X-Remote-User': '$remote_user',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/.web/': {
|
|
|
|
'target': 'http://[::1]:22050',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'website_check_path': '/.web/',
|
|
|
|
'website_check_string': 'Radicale',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|