Build Windows Templates in RHV
This commit is contained in:
20
roles/oatakan.ansible-role-ovirt/templates/cloud_init.yml.j2
Normal file
20
roles/oatakan.ansible-role-ovirt/templates/cloud_init.yml.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
cloud_init:
|
||||
{% if item.networks[0].ip is defined and item.networks[0].netmask is defined and item.networks[0].gateway is defined %}
|
||||
nic_boot_protocol: static
|
||||
nic_ip_address: "{{ item.networks[0].ip }}"
|
||||
nic_netmask: "{{ item.networks[0].netmask }}"
|
||||
nic_gateway: "{{ item.networks[0].gateway }}"
|
||||
{% else %}
|
||||
nic_boot_protocol: dhcp
|
||||
{% endif %}
|
||||
nic_name: {{ item.networks[0].nic_name | default(item.networks[0].device_name) | default('eth0') }}
|
||||
host_name: "{{ item.name }}.{{ item.domain | default('') }}"
|
||||
{% if item.dns_servers is defined %}
|
||||
dns_servers: "{{ item.dns_servers|join(' ') }}"
|
||||
{% endif %}
|
||||
{% if item.user_name is defined %}
|
||||
user_name: "{{ item.user_name }}"
|
||||
{% endif %}
|
||||
{% if item.root_password is defined %}
|
||||
root_password: "{{ item.root_password }}"
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user