Ansible: Esxi host

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 }}"

Join the ConversationLeave a reply

Your email address will not be published. Required fields are marked *

Comment*

Name*

Website