File tree Expand file tree Collapse file tree 2 files changed +34
-37
lines changed Expand file tree Collapse file tree 2 files changed +34
-37
lines changed Original file line number Diff line number Diff line change 322
322
- " not pve_cluster_enabled | bool or (pve_cluster_enabled | bool and inventory_hostname == groups[pve_group][0])"
323
323
- " pve_datacenter_cfg | length > 0"
324
324
325
- - name : Check domains.cfg exists
326
- stat :
327
- path : " /etc/pve/domains.cfg"
328
- register : _domains_cfg
329
- when :
330
- - not pve_cluster_enabled or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
331
- - pve_domains_cfg | length > 0
332
-
333
- - name : Create domains.cfg if it does not exist
334
- file :
335
- path : " /etc/pve/domains.cfg"
336
- state : " touch"
337
- when :
338
- - not pve_cluster_enabled | bool or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
339
- - pve_domains_cfg | length > 0
340
- - not _domains_cfg.stat.exists
341
-
342
- - name : Configure domains.cfg
343
- # The parser for domains.cfg requires a blank line after each domain,
344
- # and there's a TAB character before printing each key / value pair for a domain
345
- copy :
346
- dest : " /etc/pve/domains.cfg"
347
- owner : " root"
348
- group : " www-data"
349
- mode : " 0640"
350
- content : |
351
- {% for domain in pve_domains_cfg %}
352
- {{ domain.type }}: {{ domain.name }}
353
- {% for k,v in domain.items() %}
354
- {% if k != 'name' %}
355
- {% if k != 'type' %}
356
- {{ k }} {{ v }}
357
- {% endif %}
358
- {% endif %}
359
- {% endfor %}
360
-
361
- {% endfor %}
325
+ - import_tasks : realms_config.yml
362
326
when :
363
327
- not pve_cluster_enabled | bool or (pve_cluster_enabled and inventory_hostname == groups[pve_group][0])
364
328
- pve_domains_cfg | length > 0
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Check domains.cfg exists
3
+ stat :
4
+ path : " /etc/pve/domains.cfg"
5
+ register : _domains_cfg
6
+
7
+ - name : Create domains.cfg if it does not exist
8
+ file :
9
+ path : " /etc/pve/domains.cfg"
10
+ state : " touch"
11
+ when :
12
+ - not _domains_cfg.stat.exists
13
+
14
+ - name : Configure domains.cfg
15
+ # The parser for domains.cfg requires a blank line after each domain,
16
+ # and there's a TAB character before printing each key / value pair for a domain
17
+ copy :
18
+ dest : " /etc/pve/domains.cfg"
19
+ owner : " root"
20
+ group : " www-data"
21
+ mode : " 0640"
22
+ content : |
23
+ {% for domain in pve_domains_cfg %}
24
+ {{ domain.type }}: {{ domain.name }}
25
+ {% for k,v in domain.items() %}
26
+ {% if k != 'name' %}
27
+ {% if k != 'type' %}
28
+ {{ k }} {{ v }}
29
+ {% endif %}
30
+ {% endif %}
31
+ {% endfor %}
32
+
33
+ {% endfor %}
You can’t perform that action at this time.
0 commit comments