--- - fail: msg="Option 'services.prometheus.config' has to be set!" when: - services.prometheus.config is not defined - fail: msg="Nginx role has to be enabled when using nginx options!" when: - services.prometheus.nginx.enable is true - services.nginx.enable is false - fail: msg="Option 'services.prometheus.nginx.domain' has to be set when using nginx!" when: - services.prometheus.nginx.enable is defined - services.prometheus.nginx.enable is true - services.prometheus.nginx.domain is not defined - fail: msg="Option 'services.prometheus.nginx.sslOnly' has to be set when using nginx!" when: - services.prometheus.nginx.enable is defined - services.prometheus.nginx.enable is true - services.prometheus.nginx.sslOnly is not defined - fail: msg="Option 'services.prometheus.nginx.ssl.cert' has to be set when using nginx with ssl!" when: - services.prometheus.nginx.enable is defined - services.prometheus.nginx.enable is true - services.prometheus.nginx.ssl.enable is defined - services.prometheus.nginx.ssl.enable is true - services.prometheus.nginx.ssl.cert is not defined - fail: msg="Option 'services.prometheus.nginx.ssl.privkey' has to be set when using nginx with ssl!" when: - services.prometheus.nginx.enable is defined - services.prometheus.nginx.enable is true - services.prometheus.nginx.ssl.enable is defined - services.prometheus.nginx.ssl.enable is true - services.prometheus.nginx.ssl.privkey is not defined