Ansible ile hostlarin DNS Server kayitlarini set etmek icin bu playbook u kullanabilirsiniz
---
- name: Vmware Esxi Host DNS Configuration
hosts: {{ esxi_hostname }}
conecction: local
gather_facts: no
tasks:
- name: Set DNS servers for all ESXi Host in given Cluster
community.vmware.vmware_host_dns:
validate_certs: False
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: "{{ esxi_hostname }}"
type: static
host_name: "{{ esxi_hostname }}"
domain: "{{ domain }}"
dns_servers:
- '{{ dns1 }}'
- '{{ dns2 }}'
search_domains:
- '{{ domain }}'
delegate_to: localhost
register: esxi_host_dns
- debug:
msg: "{{ esxi_host_dns }}"
Bir yanıt bırakın