-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathenvironment.yml.j2
67 lines (64 loc) · 2.02 KB
/
environment.yml.j2
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
# License: MIT
# Author Information
# Larry Smith Jr.
# http://everythingshouldbevirtual.com
# https://www.twitter.com/mrlesmithjr
# To view available options and settings reference the environment.yml in
# Test/dummy/server/environment.yml
provisioners: {{ environment['provisioners'] }}
{%- if environment['synced_folders'] is not none %}
synced_folders: {{ environment['synced_folders'] }}
{%- else %}
synced_folders: []
{%- endif %}
{%- if environment['nodes'] != [] %}
nodes:
{%- for node in environment['nodes'] %}
- name: {{ node['name'] }}
{%- if node['ansible_groups'] != [] %}
ansible_groups:
{%- for group in node['ansible_groups'] %}
- {{ group }}
{%- endfor -%}
{% else %}
ansible_groups: []
{% endif %}
box: {{ node['box'] }}
desktop: {{ node['desktop']|lower }}
{%- if node['disable_synced_folders'] is not none %}
disable_synced_folders: {{ node['disable_synced_folders']|lower }}
{%- endif %}
disks: {{ node['disks'] }}
{%- if node['interfaces'] != [] %}
interfaces:
{%- for interface in node['interfaces'] %}
- ip: {{ interface['ip'] }}
auto_config: {{ interface['auto_config']|lower }}
method: {{ interface['method'] }}
{%- if interface['network_name'] is defined %}
network_name: {{ interface['network_name'] }}
{%- endif %}
{%- endfor -%}
{% else %}
interfaces: []
{%- endif %}
linked_clone: {{ node['linked_clone']|lower }}
{%- if node['manage_hostname'] is not none %}
manage_hostname: {{ node['manage_hostname']|lower }}
{%- endif %}
mem: {{ node['mem'] }}
provision: {{ node['provision']|lower }}
provisioners: {{ node['provisioners'] }}
{%- if node['synced_folder'] is not none %}
synced_folder:
type: {{ node['synced_folder']['type'] }}
{%- endif %}
vcpu: {{ node['vcpu'] }}
port_forwards: {{ node['port_forwards'] }}
windows: {{ node['windows']|lower }}
{% endfor -%}
{% else %}
nodes: []
{% endif %}