Add DNS Search option
This commit is contained in:
@@ -82,6 +82,7 @@ Inventory variables are defined for individual hosts or VMs in the inventory fil
|
||||
| `vm_ballo` (optional) | Ballooning memory size for the VM, used to adjust memory allocation dynamically. | `2048` |
|
||||
| `vm_cpus` | Number of CPU cores assigned to the virtual machine. | `4` |
|
||||
| `vm_dns` | DNS server IP address(es) for the virtual machine's network configuration. | `1.0.0.1`, `1.1.1.1` |
|
||||
| `vm_dns_search` | DNS search zone for the virtual machine's network configuration. | `example.com` |
|
||||
| `vm_gw` | Default gateway IP address for the virtual machine's network configuration. | `192.168.0.1` |
|
||||
| `vm_id` | Unique identifier for the virtual machine. | `101` |
|
||||
| `vm_ip` | IP address assigned to the virtual machine. | `192.168.0.10` |
|
||||
|
||||
@@ -19,6 +19,7 @@ all:
|
||||
vm_nif: vmbr1
|
||||
vm_gw: 192.168.122.1
|
||||
vm_dns: 1.1.1.1
|
||||
vm_dns_search: "example.com"
|
||||
192.168.122.11:
|
||||
hostname: database
|
||||
vm_id: 101
|
||||
|
||||
@@ -9,6 +9,9 @@ mac-address={{ net_mac.stdout }}
|
||||
[ipv4]
|
||||
address={{ vm_ip }}/{{ vm_nms | default (24) }},{{ vm_gw }}
|
||||
dns={{ vm_dns }}
|
||||
{% if vm_dns_search is defined %}
|
||||
dns-search={{ vm_dns_search }}
|
||||
{% endif %}
|
||||
method=manual
|
||||
|
||||
[ipv6]
|
||||
|
||||
Reference in New Issue
Block a user