--- - fail: msg="Option 'services.syncthing.user' has to be set!" when: - services.syncthing.user is not defined #todo: check that user exists - fail: msg="Nginx role has to be enabled when using nginx options!" when: - services.syncthing.nginx.enable is true - services.nginx.enable is false - fail: msg="Option 'services.syncthing.nginx.domain' has to be set when using nginx!" when: - services.syncthing.nginx.enable is defined - services.syncthing.nginx.enable is true - services.syncthing.nginx.domain is not defined - fail: msg="Option 'services.syncthing.nginx.sslOnly' has to be set when using nginx!" when: - services.syncthing.nginx.enable is defined - services.syncthing.nginx.enable is true - services.syncthing.nginx.sslOnly is not defined - fail: msg="Option 'services.syncthing.nginx.ssl.cert' has to be set when using nginx with ssl!" when: - services.syncthing.nginx.enable is defined - services.syncthing.nginx.enable is true - services.syncthing.nginx.ssl.enable is defined - services.syncthing.nginx.ssl.enable is true - services.syncthing.nginx.ssl.cert is not defined - fail: msg="Option 'services.syncthing.nginx.ssl.privkey' has to be set when using nginx with ssl!" when: - services.syncthing.nginx.enable is defined - services.syncthing.nginx.enable is true - services.syncthing.nginx.ssl.enable is defined - services.syncthing.nginx.ssl.enable is true - services.syncthing.nginx.ssl.privkey is not defined