matrix-docker-ansible-deploy
matrix-docker-ansible-deploy copied to clipboard
Support for a Synology DiskStation
A Synology DiskStation is a type of managed NAS. It does have SSH access with Python 2 and 3 installed along with Docker support from the CLI and a GUI. This should be doable except for anything modifying users, groups, services, or installing packages.
EDIT: I would be willing to work on this
Services are managed using synoservicecfg
. There is currently no Ansible support (AFAIK?). The command line options are as follows:
Copyright (c) 2003-2019 Synology Inc. All rights reserved.
SynoService Tool Help (Version 24922)
Usage: synoservice
--help Show this help
--help-dev More specialty functions for deveplopment
--is-enabled [ServiceName] Check if the service is enabled
--status [ServiceName] Get the status of specified services
--enable [ServiceName] Set runkey to yes and start the service (alias to --start)
--disable [ServiceName] Set runkey to no and stop the service (alias to --stop)
--hard-enable [ServiceName] Set runkey to yes and start the service and its dependency (alias to --hard-start)
--hard-disable [ServiceName] Set runkey to no and stop the service and its dependency (alias to --hard-stop)
--restart [ServiceName] Restart the given service
--reload [ServiceName] Reload the given service
--pause [ServiceName] Pause the given service
--resume [ServiceName] Resume the given service
--pause-by-reason [ServiceName] [Reason] Pause the service by given reason
--resume-by-reason [ServiceName] [Reason] Resume the service by given reason
--pause-all (-p) [Reason] (Event) Pause all service by given reason with optional event(use -p to include packages)
--pause-all-no-action (-p) [Reason] (Event) Set all service runkey to no but leave the current service status(use -p to include packages)
--resume-all (-p) [Reason] Resume all service by given reason(use -p to include packages)
--reload-by-type [type] (buffer) Reload services with specified type
--restart-by-type [type] (buffer) Restart services with specified type
Type may be {file_protocol|application}
Sleep $buffer seconds before exec the command (default is 0)
Not likely, since the whole playbook uses systemd to work.
Seems like it's not viable to target it (because it's just too different), although it would've been nice.
Seems like it's not viable to target it (because it's just too different), although it would've been nice.
Just want to provide some updates on this conversation. The new DSM7 is using systemd and I can install matrix by using this Ansible playbook on Synology DSM 7 (918+). Generally speaking, there are 3 changes I have made to the source code:
- Change the name of the docker service (from 'docker.service' to 'pkgctl-Docker.service')
- Change the name of the ntp to 'ntpd'
- User Creation command is changed. Synology has removed the general user creation command.
I am definitely willing to contribute my source code if needed.
Sounds viable then! Thank you for investigating!
If you have time to work on a PR, that'd be great!