1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
- fail: msg="This role currently only supports AlpineLinux!"
when:
- ansible_distribution != "Alpine"
- fail: msg="Option 'services.cgit.configFile' has to be set!"
when:
- services.cgit.configFile is not defined
- fail: msg="Nginx role has to be enabled when using nginx options!"
when:
- services.cgit.nginx.enable is true
- services.nginx.enable is false
- fail: msg="Option 'services.cgit.nginx.domain' has to be set when using nginx!"
when:
- services.cgit.nginx.enable is defined
- services.cgit.nginx.enable is true
- services.cgit.nginx.domain is not defined
- fail: msg="Option 'services.cgit.nginx.sslOnly' has to be set when using nginx!"
when:
- services.cgit.nginx.enable is defined
- services.cgit.nginx.enable is true
- services.cgit.nginx.sslOnly is not defined
- fail: msg="Option 'services.cgit.nginx.ssl.cert' has to be set when using nginx with ssl!"
when:
- services.cgit.nginx.enable is defined
- services.cgit.nginx.enable is true
- services.cgit.nginx.ssl.enable is defined
- services.cgit.nginx.ssl.enable is true
- services.cgit.nginx.ssl.cert is not defined
- fail: msg="Option 'services.cgit.nginx.ssl.privkey' has to be set when using nginx with ssl!"
when:
- services.cgit.nginx.enable is defined
- services.cgit.nginx.enable is true
- services.cgit.nginx.ssl.enable is defined
- services.cgit.nginx.ssl.enable is true
- services.cgit.nginx.ssl.privkey is not defined