--- - fail: msg="This Role only works on Archlinux when Option 'system.enableOwnRepos' is true!" when: - ansible_distribution == "Archlinux" - system.enableOwnRepos is false - fail: msg="Option 'services.rest_server.user' has to be set!" when: - services.rest_server.user is not defined - fail: msg="Option 'services.rest_server.port' has to be set!" when: - services.rest_server.port is not defined #todo: check that user exists - fail: msg="Nginx role has to be enabled when using nginx options!" when: - services.rest_server.nginx.enable is true - services.nginx.enable is false - fail: msg="Option 'services.rest_server.nginx.domain' has to be set when using nginx!" when: - services.rest_server.nginx.enable is defined - services.rest_server.nginx.enable is true - services.rest_server.nginx.domain is not defined - fail: msg="Option 'services.rest_server.nginx.sslOnly' has to be set when using nginx!" when: - services.rest_server.nginx.enable is defined - services.rest_server.nginx.enable is true - services.rest_server.nginx.sslOnly is not defined - fail: msg="Option 'services.rest_server.nginx.ssl.cert' has to be set when using nginx with ssl!" when: - services.rest_server.nginx.enable is defined - services.rest_server.nginx.enable is true - services.rest_server.nginx.ssl.enable is defined - services.rest_server.nginx.ssl.enable is true - services.rest_server.nginx.ssl.cert is not defined - fail: msg="Option 'services.rest_server.nginx.ssl.privkey' has to be set when using nginx with ssl!" when: - services.rest_server.nginx.enable is defined - services.rest_server.nginx.enable is true - services.rest_server.nginx.ssl.enable is defined - services.rest_server.nginx.ssl.enable is true - services.rest_server.nginx.ssl.privkey is not defined