Category Archives: Devops

Ansible: Add Esxi Host to Active Directory

By | 28/12/2022

Esxi hostunuzu AD e join etmek icin asagidaki playbooku kullanabilirsiniz. Parametrelere yetkili bir AD user name ve passwordu yazmaniz gerekiyor.   — – name: Vmware Esxi Host Configuration hosts: ‘{{ new_esxi_hostname }}.{{ domain }}’ connection: local gather_facts: no tasks: – name: Join an AD domain community.vmware.vmware_host_active_directory: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username… Read More »

Ansible: Esxi Maintenance Mode Set

By | 28/12/2022

Esxi hostunuzu Maintenance Mode almak yada cikarmak icin asagikdaki playbooku kullanabilirsiniz. Buradaki state bolumunu senaryaniza gore degistirmeniz gerekiyor.   — – name: Vmware Esxi Host Configuration hosts: ‘{{ esxi_hostname }}’ gather_facts: no connection: local tasks: – name: Exit Maintenance Mode community.vmware.vmware_maintenancemode: validate_certs: False hostname: “{{ vcenter_hostname }}” username: “{{ vcenter_username }}” password: “{{ vcenter_password }}”… Read More »

Ansible: ESXi Host Reconnect to Vcenter

By | 28/12/2022

Baglantisi kesilmis ESX hostunuzu bu playbook ile tekrar vcenter a reconnect edebilirsiniz. — – name: Vmware Esxi Host Configuration hosts: ‘{{ delegate_server }}’ gather_facts: no tasks: – name: Reconnect Esxi Host community.vmware.vmware_host: validate_certs: no datacenter: “{{ datacenter_name }}” cluster_name: “{{ cluster_name }}” hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ esxi_hostname:… Read More »

Ansible: ESXi Config Restore

By | 28/12/2022

ESX hostunuzu config backup filedan geri donmek icin asagidaki playbooku kullanabilirsiniz.   — – name: Esxi Config Backup hosts: ‘{{ delegate_server }}’ gather_facts: no tasks: – name: Restore ESXi Host from Config Backup community.vmware.vmware_cfg_backup: validate_certs: False #hostname: “{{ vcenter_hostname }}” #username: “{{ vcenter_username }}” #password: “{{ vcenter_password }}” hostname: “{{ esxi_hostname }}” username: “{{ esxi_username… Read More »

Ansible: ESXi config backup

By | 28/12/2022

ESXi hostunuzun config backup dosyasini bu playbook ile istedginiz lokasyona kayit edebilirsiniz.   — – name: Esxi Config Backup hosts: ‘{{ delegate_server }}’ gather_facts: no tasks: – name: Save the ESXi configuration locally by authenticating against the vCenter and selecting the ESXi host community.vmware.vmware_cfg_backup: validate_certs: False hostname: “{{ vcenter_hostname }}” username: “{{ vcenter_username }}” password:… Read More »

Ansible: Shutdown ESXi Host

By | 28/12/2022

ESXi hostu ansible ile shutdown yapmak icin asagidaki playbooku kullanabilirsiniz.   — – name: Vmware Esxi Host Configuration hosts: ‘{{ esxi_hostname }}’ connection: local gather_facts: no tasks: – name: Set the state of a host system to shutdown community.vmware.vmware_host_powerstate: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ esxi_hostname: ‘{{… Read More »

Ansible: Cluster Level NTP Servisi Baslatmak

By | 28/12/2022

Ansible ile tum hostlardaki SSH servisini baslatmak icin asagidaki playbooku kullanabilirsiniz. — – hosts: “{{ cluster_name }}” gather_facts: false connection: local tasks: – name: “{{ inventory_hostname }} ssh service starting” community.vmware.vmware_host_service_manager: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ cluster_name: ‘{{ cluster_name }}’ esxi_hostname: ‘{{ inventory_hostname }}’ service_name: TSM-SSH… Read More »

Ansible: Start ESX SSH service

By | 28/12/2022

Ansible ile SSH serivisini baslatmak icin asagidaki playbooku kullanabilirsiniz.   — – hosts: all gather_facts: false connection: local tasks: – name: “{{ inventory_hostname }} ssh service starting” community.vmware.vmware_host_service_manager: esxi_hostname: ‘{{ inventory_hostname }}’ validate_certs: False service_name: TSM-SSH state: stop delegate_to: localhost

Ansible: Vcenter Cluster Olusturmak

By | 28/12/2022

Ansible ile esxi cluster olsuturmak icin asagidaki playbooku kullanabilirsiniz.   — – name: Create Cluster hosts: localhost connection: local gather_facts: no tasks: – name: Create Cluster community.vmware.vmware_cluster: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ datacenter: ‘{{ datacenter_name }}’ cluster_name: ‘{{ cluster_name }}’ enable_ha: false enable_drs: false enable_vsan: false… Read More »

Ansible: Esxi host

By | 28/12/2022

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:… Read More »

Ansible: Esxi NTP bilgilerini guncellemek

By | 28/12/2022

Ansible ile hostlarinizdaki NTP kayitlarini guncellemek ve servisi calistirmak icin asagidaki playbooku kullanabilirsiniz.   — – name: Vmware NTP Configuration hosts: localhost connection: local gather_facts: no tasks: – name: Set NTP servers Current ESX host community.vmware.vmware_host_ntp: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ esxi_hostname: “{{ esxi_hostname }}” state:… Read More »

Ansible: Esxi Host NTP Bilgilerini Getirmek

By | 28/12/2022

Hostlarinizdaki NTP bilgilerini cluster level kontrol etmek icin asagidaki playbooku kullanabilirsiniz.   — – name: ESXI host NTP info hosts: localhost connection: local gather_facts: no tasks: – name: Gather NTP info about all ESXi Host in the given Cluster community.vmware.vmware_host_ntp_info: validate_certs: False hostname: ‘{{ vcenter_hostname }}’ username: ‘{{ vcenter_username }}’ password: ‘{{ vcenter_password }}’ cluster_name:… Read More »

Ansible: Vmware Host UP Durumunu Kontrol Etmek

By | 28/12/2022

Islemleriniz esnasinda hostu reboot ettiniz ve tekrar up oldugunu kontrol ederek bir sonraki adima gecmesini istiyorsunuz. Asagidaki playbooku piplenanizda kullanabilirsiniz. — – name: Vmware Esxi Hypervisor Installation hosts: “{{ delegate_server }}” gather_facts: no tasks: – name: ESXi wait for the reboot to complete wait_for: host: ‘{{ esxi_hostname }}’ port: 443 delay: 120 state: started timeout:… Read More »

Ansible: Vmware ESX Host Power Management Policy

By | 28/12/2022

Esxi hostlarinizda powermgmt policy asagidaki yml dosyasi ve ansible ile desgitirebilirsiniz. Eger bu islemi cluster bazli yapmak istiyorsaniz Clusterdaki yorum satirini kaldirmaniz gerekiyor. Bu islem sonrasinda host reboot gerekiyor. Bunun icinde bir yml file paylasacagim. Bu islemleri bir pipeline uzerinde yapmak gerekir. Once hostun maintenace mode alinmasi sonrasinda gerekli config degisikligi ve sunucunun reboot edilmesi… Read More »